Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when activate translate plugin Direct Traslate #696

Closed
7yang7 opened this issue Sep 22, 2021 · 9 comments
Closed

Error when activate translate plugin Direct Traslate #696

7yang7 opened this issue Sep 22, 2021 · 9 comments

Comments

@7yang7
Copy link

7yang7 commented Sep 22, 2021

Flow Launcher version: 1.8.3
OS Version: Microsoft Windows NT 10.0.19042.0
IntPtr Length: 8
x64: True

Python Path:
Date: 09/22/2021 21:43:24
Exception:
System.IO.InvalidDataException: Direct Translate|Traceback (most recent call last):
File "C:\Users\Yang\AppData\Roaming\FlowLauncher\Plugins\Direct Translate-1.0.0\main.py", line 2, in
from textblob import TextBlob, exceptions
ModuleNotFoundError: No module named 'textblob'

at Flow.Launcher.Core.Plugin.JsonRPCPlugin.ExecuteAsync(ProcessStartInfo startInfo, CancellationToken token) in C:\projects\flow-launcher\Flow.Launcher.Core\Plugin\JsonRPCPlugin.cs:line 261
at Flow.Launcher.Core.Plugin.JsonRPCPlugin.ExecuteAsync(ProcessStartInfo startInfo, CancellationToken token) in C:\projects\flow-launcher\Flow.Launcher.Core\Plugin\JsonRPCPlugin.cs:line 275
at Flow.Launcher.Core.Plugin.JsonRPCPlugin.QueryAsync(Query query, CancellationToken token) in C:\projects\flow-launcher\Flow.Launcher.Core\Plugin\JsonRPCPlugin.cs:line 286
at Flow.Launcher.Core.Plugin.PluginManager.<>c__DisplayClass22_0.<b__0>d.MoveNext() in C:\projects\flow-launcher\Flow.Launcher.Core\Plugin\PluginManager.cs:line 192
--- End of stack trace from previous location ---
at Flow.Launcher.Infrastructure.Stopwatch.DebugAsync(String message, Func`1 action) in C:\projects\flow-launcher\Flow.Launcher.Infrastructure\Stopwatch.cs:line 40
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 211
at Flow.Launcher.ViewModel.MainViewModel.<>c__DisplayClass111_0.<g__QueryTask|2>d.MoveNext() in C:\projects\flow-launcher\Flow.Launcher\ViewModel\MainViewModel.cs:line 563
--- End of stack trace from previous location ---
at Flow.Launcher.ViewModel.MainViewModel.QueryResults() in C:\projects\flow-launcher\Flow.Launcher\ViewModel\MainViewModel.cs:line 527
at System.Threading.Tasks.Task.<>c.b__140_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)

@Zeroto521
Copy link
Member

File "C:\Users\Yang\AppData\Roaming\FlowLauncher\Plugins\Direct Translate-1.0.0\main.py", line 2, in
from textblob import TextBlob, exceptions
ModuleNotFoundError: No module named 'textblob'

Could you please check your python environment has textblob or not?

@7yang7
Copy link
Author

7yang7 commented Sep 23, 2021

I just install flow.launcher and that's it ? Do you need to install python additionally?

@Zeroto521
Copy link
Member

@taooceros
Copy link
Member

I think currently flow will download embedded python, which don't include pip.

@7yang7
Copy link
Author

7yang7 commented Sep 23, 2021

Offers only search in Google
image

@taooceros
Copy link
Member

I would consider the direct translate plugin doesn't update to the new embedded python installed by Flow. This is the current workaround for this. Install python separately and install the required lib for python with command line pip install *. And then set the python path in Flow to the python path you installed, and restart Flow.
Drimix20/Flow.Launcher.Plugin.DirectTranslate#1

@7yang7
Copy link
Author

7yang7 commented Oct 18, 2021

Hello. I saw that the plugin was updated, but when i tried activation it, i get a new error :(

Flow Launcher version: 1.8.3
OS Version: Microsoft Windows NT 10.0.22000.0
IntPtr Length: 8
x64: True

Python Path:
Date: 10/18/2021 14:46:37
Exception:
System.IO.InvalidDataException: Flow.Launcher.Plugin.DirectTranslate|Traceback (most recent call last):
File "C:\Users\Yang\AppData\Roaming\FlowLauncher\Plugins\Direct Translate-2.0.0\main.py", line 9, in
from plugin import Main
ModuleNotFoundError: No module named 'plugin'

at Flow.Launcher.Core.Plugin.JsonRPCPlugin.ExecuteAsync(ProcessStartInfo startInfo, CancellationToken token) in C:\projects\flow-launcher\Flow.Launcher.Core\Plugin\JsonRPCPlugin.cs:line 261
at Flow.Launcher.Core.Plugin.JsonRPCPlugin.ExecuteAsync(ProcessStartInfo startInfo, CancellationToken token) in C:\projects\flow-launcher\Flow.Launcher.Core\Plugin\JsonRPCPlugin.cs:line 275
at Flow.Launcher.Core.Plugin.JsonRPCPlugin.QueryAsync(Query query, CancellationToken token) in C:\projects\flow-launcher\Flow.Launcher.Core\Plugin\JsonRPCPlugin.cs:line 286
at Flow.Launcher.Core.Plugin.PluginManager.<>c__DisplayClass22_0.<b__0>d.MoveNext() in C:\projects\flow-launcher\Flow.Launcher.Core\Plugin\PluginManager.cs:line 192
--- End of stack trace from previous location ---
at Flow.Launcher.Infrastructure.Stopwatch.DebugAsync(String message, Func`1 action) in C:\projects\flow-launcher\Flow.Launcher.Infrastructure\Stopwatch.cs:line 34
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 191
at Flow.Launcher.ViewModel.MainViewModel.<>c__DisplayClass111_0.<g__QueryTask|2>d.MoveNext() in C:\projects\flow-launcher\Flow.Launcher\ViewModel\MainViewModel.cs:line 553
--- End of stack trace from previous location ---
at Flow.Launcher.ViewModel.MainViewModel.QueryResults() in C:\projects\flow-launcher\Flow.Launcher\ViewModel\MainViewModel.cs:line 527
at System.Threading.Tasks.Task.<>c.b__140_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)

@taooceros
Copy link
Member

Hi, sorry for the late response. For that, I think you may need to raise an issue in the plugin repo to tell the owner about that. The owner maybe doesn't notice that flow is changing to use the portable python, which requires manually add module path.

@taooceros
Copy link
Member

https://github.com/Drimix20/Flow.Launcher.Plugin.DirectTranslate
I think it would be better for you to raise the issue instead of me🧐

@jjw24 jjw24 closed this as completed Nov 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants