Skip to content

Conversation

isnandar1471
Copy link
Contributor

This plugin is used to find out which applications are currently using a path.

@cibere
Copy link
Contributor

cibere commented Jul 3, 2025

Upon installing your plugin and attempting to use it, I get a syntax error. Please ensure that your plugin properly works


Please open new issue in https://github.com/isnandar1471/flow.launcher.plugin.used-by/issues
1. Upload log file: C:\Users\default.MyPC\AppData\Roaming\FlowLauncher\Logs\1.20.1\2025-07-03.txt
2. Copy below exception message

Flow Launcher version: 1.20.1
OS Version: 22631.5335
IntPtr Length: 8
x64: True

Python Path: C:\Users\default.MyPC\AppData\Roaming\FlowLauncher\Environments\Python\PythonEmbeddable-v3.11.4\pythonw.exe
Node Path: C:\Program Files\nodejs\node.exe

Date: 07/03/2025 15:43:48
Exception:
Used-By Exception: 
Websites: https://github.com/isnandar1471/flow.launcher.plugin.used-by
Author: isnandar1471
Version: 0.0.1
Flow.Launcher.Core.ExternalPlugins.FlowPluginException: Traceback (most recent call last):
  File "<string>", line 9, in <module>
  File "<frozen runpy>", line 291, in run_path
  File "<frozen runpy>", line 98, in _run_module_code
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Users\default.MyPC\AppData\Roaming\FlowLauncher\Plugins\flow.launcher.plugin.used-by-86db67f1-de20-4641-ac74-4f437936eb54\main.py", line 11, in <module>
    from plugin import UsedBy
  File "C:\Users\default.MyPC\AppData\Roaming\FlowLauncher\Plugins\flow.launcher.plugin.used-by-86db67f1-de20-4641-ac74-4f437936eb54\plugin\__init__.py", line 3, in <module>
    from plugin.UsedBy import UsedBy
  File "C:\Users\default.MyPC\AppData\Roaming\FlowLauncher\Plugins\flow.launcher.plugin.used-by-86db67f1-de20-4641-ac74-4f437936eb54\plugin\UsedBy.py", line 182
    title: str = f"{proc["name"]} ({proc["pid"]})"
                          ^^^^
SyntaxError: f-string: unmatched '['

 ---> System.IO.InvalidDataException: Traceback (most recent call last):
  File "<string>", line 9, in <module>
  File "<frozen runpy>", line 291, in run_path
  File "<frozen runpy>", line 98, in _run_module_code
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Users\default.MyPC\AppData\Roaming\FlowLauncher\Plugins\flow.launcher.plugin.used-by-86db67f1-de20-4641-ac74-4f437936eb54\main.py", line 11, in <module>
    from plugin import UsedBy
  File "C:\Users\default.MyPC\AppData\Roaming\FlowLauncher\Plugins\flow.launcher.plugin.used-by-86db67f1-de20-4641-ac74-4f437936eb54\plugin\__init__.py", line 3, in <module>
    from plugin.UsedBy import UsedBy
  File "C:\Users\default.MyPC\AppData\Roaming\FlowLauncher\Plugins\flow.launcher.plugin.used-by-86db67f1-de20-4641-ac74-4f437936eb54\plugin\UsedBy.py", line 182
    title: str = f"{proc["name"]} ({proc["pid"]})"
                          ^^^^
SyntaxError: f-string: unmatched '['

   at Flow.Launcher.Core.Plugin.JsonRPCPlugin.ExecuteAsync(ProcessStartInfo startInfo, CancellationToken token) in C:\projects\flow-launcher\Flow.Launcher.Core\Plugin\JsonRPCPlugin.cs:line 220
   at Flow.Launcher.Core.Plugin.JsonRPCPlugin.ExecuteAsync(ProcessStartInfo startInfo, CancellationToken token) in C:\projects\flow-launcher\Flow.Launcher.Core\Plugin\JsonRPCPlugin.cs:line 225
   at Flow.Launcher.Core.Plugin.JsonRPCPlugin.QueryAsync(Query query, CancellationToken token) in C:\projects\flow-launcher\Flow.Launcher.Core\Plugin\JsonRPCPlugin.cs:line 238
   at Flow.Launcher.Core.Plugin.PluginManager.<>c__DisplayClass32_0.<<QueryForPluginAsync>b__0>d.MoveNext() in C:\projects\flow-launcher\Flow.Launcher.Core\Plugin\PluginManager.cs:line 314
--- End of stack trace from previous location ---
   at Flow.Launcher.Infrastructure.Stopwatch.DebugAsync(String className, String message, Func`1 action, String methodName) in C:\projects\flow-launcher\Flow.Launcher.Infrastructure\Stopwatch.cs:line 31
   at Flow.Launcher.Core.Plugin.PluginManager.QueryForPluginAsync(PluginPair pair, Query query, CancellationToken token) in C:\projects\flow-launcher\Flow.Launcher.Core\Plugin\PluginManager.cs:line 313
   --- End of inner exception stack trace ---
   at Flow.Launcher.Core.Plugin.PluginManager.<>c__DisplayClass32_1.<QueryForPluginAsync>b__1(ActionContext _) in C:\projects\flow-launcher\Flow.Launcher.Core\Plugin\PluginManager.cs:line 342
   at Flow.Launcher.Plugin.Result.ExecuteAsync(ActionContext context) in /_/Flow.Launcher.Plugin/Result.cs:line 267
   at Flow.Launcher.ViewModel.MainViewModel.OpenResultAsync(String index) in C:\projects\flow-launcher\Flow.Launcher\ViewModel\MainViewModel.cs:line 459
   at CommunityToolkit.Mvvm.Input.AsyncRelayCommand.AwaitAndThrowIfFailed(Task executionTask)
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_0(Object state)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

Copy link
Contributor

@cibere cibere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix the error I mentioned in my comment

@isnandar1471
Copy link
Contributor Author

Apologies for the mistake — it was caused by a version mismatch between my local environment and the GitHub workflow. I've fixed the issue.
Thank you for checking and reviewing it, and feel free to let me know if anything else needs to be addressed!

cibere
cibere previously approved these changes Jul 8, 2025
Copy link
Contributor

@cibere cibere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have access to my laptop so I'm unable to test the change, however everything else looks good to me.

@Jack251970
Copy link
Member

@isnandar1471 I installed it but it gave this exception when using its action keyword:


Please open new issue in https://github.com/isnandar1471/flow.launcher.plugin.used-by/issues
1. Upload log file: C:\Users\11602\AppData\Roaming\FlowLauncher\Logs\1.20.1\2025-07-09.txt
2. Copy below exception message

Flow Launcher version: 1.20.1
OS Version: 26100.4061
IntPtr Length: 8
x64: True

Python Path: C:\Users\11602\AppData\Roaming\FlowLauncher\Environments\Python\PythonEmbeddable-v3.11.4\pythonw.exe
Node Path: 

Date: 07/09/2025 04:41:24
Exception:
Used-By Exception: 
Websites: https://github.com/isnandar1471/flow.launcher.plugin.used-by
Author: isnandar1471
Version: 0.0.2
Flow.Launcher.Core.ExternalPlugins.FlowPluginException: Traceback (most recent call last):
  File "<string>", line 9, in <module>
  File "<frozen runpy>", line 291, in run_path
  File "<frozen runpy>", line 98, in _run_module_code
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Users\11602\AppData\Roaming\FlowLauncher\Plugins\Used-By-0.0.2\main.py", line 11, in <module>
    from plugin import UsedBy
  File "C:\Users\11602\AppData\Roaming\FlowLauncher\Plugins\Used-By-0.0.2\plugin\__init__.py", line 3, in <module>
    from plugin.UsedBy import UsedBy
  File "C:\Users\11602\AppData\Roaming\FlowLauncher\Plugins\Used-By-0.0.2\plugin\UsedBy.py", line 9, in <module>
    from psutil import process_iter, Process, NoSuchProcess
  File "C:\Users\11602\AppData\Roaming\FlowLauncher\Plugins\Used-By-0.0.2\lib\psutil\__init__.py", line 102, in <module>
    from . import _pswindows as _psplatform
  File "C:\Users\11602\AppData\Roaming\FlowLauncher\Plugins\Used-By-0.0.2\lib\psutil\_pswindows.py", line 29, in <module>
    from ._psutil_windows import ABOVE_NORMAL_PRIORITY_CLASS
ModuleNotFoundError: No module named 'psutil._psutil_windows'

 ---> System.IO.InvalidDataException: Traceback (most recent call last):
  File "<string>", line 9, in <module>
  File "<frozen runpy>", line 291, in run_path
  File "<frozen runpy>", line 98, in _run_module_code
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Users\11602\AppData\Roaming\FlowLauncher\Plugins\Used-By-0.0.2\main.py", line 11, in <module>
    from plugin import UsedBy
  File "C:\Users\11602\AppData\Roaming\FlowLauncher\Plugins\Used-By-0.0.2\plugin\__init__.py", line 3, in <module>
    from plugin.UsedBy import UsedBy
  File "C:\Users\11602\AppData\Roaming\FlowLauncher\Plugins\Used-By-0.0.2\plugin\UsedBy.py", line 9, in <module>
    from psutil import process_iter, Process, NoSuchProcess
  File "C:\Users\11602\AppData\Roaming\FlowLauncher\Plugins\Used-By-0.0.2\lib\psutil\__init__.py", line 102, in <module>
    from . import _pswindows as _psplatform
  File "C:\Users\11602\AppData\Roaming\FlowLauncher\Plugins\Used-By-0.0.2\lib\psutil\_pswindows.py", line 29, in <module>
    from ._psutil_windows import ABOVE_NORMAL_PRIORITY_CLASS
ModuleNotFoundError: No module named 'psutil._psutil_windows'

   at Flow.Launcher.Core.Plugin.JsonRPCPlugin.ExecuteAsync(ProcessStartInfo startInfo, CancellationToken token) in C:\projects\flow-launcher\Flow.Launcher.Core\Plugin\JsonRPCPlugin.cs:line 220
   at Flow.Launcher.Core.Plugin.JsonRPCPlugin.ExecuteAsync(ProcessStartInfo startInfo, CancellationToken token) in C:\projects\flow-launcher\Flow.Launcher.Core\Plugin\JsonRPCPlugin.cs:line 225
   at Flow.Launcher.Core.Plugin.JsonRPCPlugin.QueryAsync(Query query, CancellationToken token) in C:\projects\flow-launcher\Flow.Launcher.Core\Plugin\JsonRPCPlugin.cs:line 238
   at Flow.Launcher.Core.Plugin.PluginManager.<>c__DisplayClass33_0.<<QueryForPluginAsync>b__0>d.MoveNext() in C:\projects\flow-launcher\Flow.Launcher.Core\Plugin\PluginManager.cs:line 325
--- End of stack trace from previous location ---
   at Flow.Launcher.Infrastructure.Stopwatch.DebugAsync(String className, String message, Func`1 action, String methodName) in C:\projects\flow-launcher\Flow.Launcher.Infrastructure\Stopwatch.cs:line 31
   at Flow.Launcher.Core.Plugin.PluginManager.QueryForPluginAsync(PluginPair pair, Query query, CancellationToken token) in C:\projects\flow-launcher\Flow.Launcher.Core\Plugin\PluginManager.cs:line 324
   --- End of inner exception stack trace ---
   at Flow.Launcher.Core.Plugin.PluginManager.<>c__DisplayClass33_1.<QueryForPluginAsync>b__1(ActionContext _) in C:\projects\flow-launcher\Flow.Launcher.Core\Plugin\PluginManager.cs:line 353
   at Flow.Launcher.Plugin.Result.ExecuteAsync(ActionContext context) in /_/Flow.Launcher.Plugin/Result.cs:line 267
   at Flow.Launcher.ViewModel.MainViewModel.OpenResultAsync(String index) in C:\projects\flow-launcher\Flow.Launcher\ViewModel\MainViewModel.cs:line 472
   at CommunityToolkit.Mvvm.Input.AsyncRelayCommand.AwaitAndThrowIfFailed(Task executionTask)
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_0(Object state)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

@Jack251970
Copy link
Member

@isnandar1471 Another issue is the wrong IcoPath field which can cause plugin icon fetching issue.

image

It should be assets/logo.png instead of assets/icon.png.

https://github.com/isnandar1471/flow.launcher.plugin.used-by/blob/23ca6cce6debcafb0e48fdd72d6f4f9c24b86c97/plugin.json#L10

Copy link
Member

@jjw24 jjw24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please let us know once the two issues mentioned above have been addressed.

@cibere cibere dismissed their stale review September 3, 2025 23:41

new changes have been brought to light

@jjw24 jjw24 changed the base branch from plugin_api_v2 to main September 4, 2025 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants