MichielvanBeers / Flow.Launcher.Plugin.ChatGPT

MIT License
37 stars 5 forks source link

Problem with ChatGPT plugin #23

Closed TGS963 closed 1 year ago

TGS963 commented 1 year ago

Flow Launcher version: 1.14.0 OS Version: Microsoft Windows NT 10.0.22621.0 IntPtr Length: 8 x64: True

Python Path: C:\Users\ghosh\AppData\Local\Programs\Python\Python37\pythonw.exe Node Path: C:\Program Files\nodejs\node.exe Date: 04/14/2023 08:29:58 Exception: ChatGPT Exception: Websites: https://github.com/MichielvanBeers/Flow.Launcher.Plugin.ChatGPT Author: MichielvanBeers Version: 1.1.2 Flow.Launcher.Core.ExternalPlugins.FlowPluginException: Traceback (most recent call last): File "C:\Users\ghosh\AppData\Roaming\FlowLauncher\Plugins\ChatGPT-1.1.2\main.py", line 11, in from plugin.main import ChatGPT File "C:\Users\ghosh\AppData\Roaming\FlowLauncher\Plugins\ChatGPT-1.1.2\plugin\main.py", line 7, in from flox import Flox # noqa: E402 File "C:\Users\ghosh\AppData\Roaming\FlowLauncher\Plugins\ChatGPT-1.1.2\lib\flox__init__.py", line 13, in from functools import wraps, cached_property ImportError: cannot import name 'cached_property' from 'functools' (C:\Users\ghosh\AppData\Local\Programs\Python\Python37\lib\functools.py)

---> System.IO.InvalidDataException: Traceback (most recent call last): File "C:\Users\ghosh\AppData\Roaming\FlowLauncher\Plugins\ChatGPT-1.1.2\main.py", line 11, in from plugin.main import ChatGPT File "C:\Users\ghosh\AppData\Roaming\FlowLauncher\Plugins\ChatGPT-1.1.2\plugin\main.py", line 7, in from flox import Flox # noqa: E402 File "C:\Users\ghosh\AppData\Roaming\FlowLauncher\Plugins\ChatGPT-1.1.2\lib\flox__init__.py", line 13, in from functools import wraps, cached_property ImportError: cannot import name 'cached_property' from 'functools' (C:\Users\ghosh\AppData\Local\Programs\Python\Python37\lib\functools.py)

at Flow.Launcher.Core.Plugin.JsonRPCPlugin.ExecuteAsync(ProcessStartInfo startInfo, CancellationToken token) in C:\projects\flow-launcher\Flow.Launcher.Core\Plugin\JsonRPCPlugin.cs:line 294 at Flow.Launcher.Core.Plugin.JsonRPCPlugin.ExecuteAsync(ProcessStartInfo startInfo, CancellationToken token) in C:\projects\flow-launcher\Flow.Launcher.Core\Plugin\JsonRPCPlugin.cs:line 299 at Flow.Launcher.Core.Plugin.JsonRPCPlugin.QueryAsync(Query query, CancellationToken token) in C:\projects\flow-launcher\Flow.Launcher.Core\Plugin\JsonRPCPlugin.cs:line 314 at Flow.Launcher.Core.Plugin.PluginManager.<>cDisplayClass22_0.<b0>d.MoveNext() in C:\projects\flow-launcher\Flow.Launcher.Core\Plugin\PluginManager.cs:line 191 --- 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 190 --- End of inner exception stack trace --- 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 210 at Flow.Launcher.ViewModel.MainViewModel.<>cDisplayClass135_0.<gQueryTask|2>d.MoveNext() in C:\projects\flow-launcher\Flow.Launcher\ViewModel\MainViewModel.cs:line 829 --- End of stack trace from previous location --- at Flow.Launcher.ViewModel.MainViewModel.QueryResults() in C:\projects\flow-launcher\Flow.Launcher\ViewModel\MainViewModel.cs:line 803 at System.Threading.Tasks.Task.<>c.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)

2023-04-14.txt

MichielvanBeers commented 1 year ago

Hi @TGS963, I expect this to be happening due to that you are using Python 3.7. If you upgrade to Python 3.8 or higher, the issue should be resolved. Good luck!

TGS963 commented 1 year ago

Oh, I was using python 3.7 for some libraries. But the same issue with cached_property persists with python 3.10 as well

2023-04-15.txt

MichielvanBeers commented 1 year ago

Hmm, interesting.. In that case I have to investigate a bit further and get back to you!

MichielvanBeers commented 1 year ago

Thanks for the additional info. Looking at your .txt file, it seems that Flow Launcher is still pointing towards the 3.7 version of Python. You can set the Python path in Settings > General > Python Path. (Your current seems to be (C:\Users\[Your username]\AppData\Local\Programs\Python\Python37\). It should point towards the pythonw.exe executable.

I would've liked to support Python 3.7 as well, but since this is a library I'm making use of, I don't control the content unfortunately. It should be possible to run multiple Python versions next to each other though, so hopefully that is an option for you as well.

Let me know if this resolves your problem!

TGS963 commented 1 year ago

Hey, thanks for that, I changed the pathway in flow launcher and it works now! Thanks for the help 😊

MichielvanBeers commented 1 year ago

You're welcome :)