Garulf / spell-checker

Quickly get spelling suggestions and word definitions.
1 stars 0 forks source link

Exception every time #2

Open KyleKolander opened 1 year ago

KyleKolander commented 1 year ago

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

Python Path: Date: 10/15/2022 21:50:01 Exception: Spell Checker Exception: Websites: https://github.com/Garulf/spell-checker Author: Garulf Version: 0.1.0 Flow.Launcher.Core.ExternalPlugins.FlowPluginException: Spell Checker|Traceback (most recent call last): File "C:\scoop\apps\flow-launcher\current\app-1.9.5\UserData\Plugins\Spell Checker-0.1.0\run.py", line 9, in from plugin.main import SpellChecker File "C:\scoop\apps\flow-launcher\current\app-1.9.5\UserData\Plugins\Spell Checker-0.1.0\plugin\main.py", line 6, in from textblob import Word, TextBlob File "C:\scoop\apps\flow-launcher\current\app-1.9.5\UserData\Plugins\Spell Checker-0.1.0\lib\textblob__init.py", line 2, in from .blob import TextBlob, Word, Sentence, Blobber, WordList File "C:\scoop\apps\flow-launcher\current\app-1.9.5\UserData\Plugins\Spell Checker-0.1.0\lib\textblob\blob.py", line 29, in import nltk File "C:\scoop\apps\flow-launcher\current\app-1.9.5\UserData\Plugins\Spell Checker-0.1.0\lib\nltk__init__.py", line 137, in from nltk.text import * File "C:\scoop\apps\flow-launcher\current\app-1.9.5\UserData\Plugins\Spell Checker-0.1.0\lib\nltk\text.py", line 29, in from nltk.tokenize import sent_tokenize File "C:\scoop\apps\flow-launcher\current\app-1.9.5\UserData\Plugins\Spell Checker-0.1.0\lib\nltk\tokenize__init__.py", line 65, in from nltk.tokenize.casual import TweetTokenizer, casual_tokenize File "C:\scoop\apps\flow-launcher\current\app-1.9.5\UserData\Plugins\Spell Checker-0.1.0\lib\nltk\tokenize\casual.py", line 49, in import regex # https://github.com/nltk/nltk/issues/2409 File "C:\scoop\apps\flow-launcher\current\app-1.9.5\UserData\Plugins\Spell Checker-0.1.0\lib\regex\init__.py", line 1, in from .regex import * File "C:\scoop\apps\flow-launcher\current\app-1.9.5\UserData\Plugins\Spell Checker-0.1.0\lib\regex\regex.py", line 421, in import regex._regex_core as _regex_core File "C:\scoop\apps\flow-launcher\current\app-1.9.5\UserData\Plugins\Spell Checker-0.1.0\lib\regex_regex_core.py", line 21, in import regex._regex as _regex ModuleNotFoundError: No module named 'regex._regex'

---> System.IO.InvalidDataException: Spell Checker|Traceback (most recent call last): File "C:\scoop\apps\flow-launcher\current\app-1.9.5\UserData\Plugins\Spell Checker-0.1.0\run.py", line 9, in from plugin.main import SpellChecker File "C:\scoop\apps\flow-launcher\current\app-1.9.5\UserData\Plugins\Spell Checker-0.1.0\plugin\main.py", line 6, in from textblob import Word, TextBlob File "C:\scoop\apps\flow-launcher\current\app-1.9.5\UserData\Plugins\Spell Checker-0.1.0\lib\textblob__init.py", line 2, in from .blob import TextBlob, Word, Sentence, Blobber, WordList File "C:\scoop\apps\flow-launcher\current\app-1.9.5\UserData\Plugins\Spell Checker-0.1.0\lib\textblob\blob.py", line 29, in import nltk File "C:\scoop\apps\flow-launcher\current\app-1.9.5\UserData\Plugins\Spell Checker-0.1.0\lib\nltk__init__.py", line 137, in from nltk.text import * File "C:\scoop\apps\flow-launcher\current\app-1.9.5\UserData\Plugins\Spell Checker-0.1.0\lib\nltk\text.py", line 29, in from nltk.tokenize import sent_tokenize File "C:\scoop\apps\flow-launcher\current\app-1.9.5\UserData\Plugins\Spell Checker-0.1.0\lib\nltk\tokenize__init__.py", line 65, in from nltk.tokenize.casual import TweetTokenizer, casual_tokenize File "C:\scoop\apps\flow-launcher\current\app-1.9.5\UserData\Plugins\Spell Checker-0.1.0\lib\nltk\tokenize\casual.py", line 49, in import regex # https://github.com/nltk/nltk/issues/2409 File "C:\scoop\apps\flow-launcher\current\app-1.9.5\UserData\Plugins\Spell Checker-0.1.0\lib\regex\init__.py", line 1, in from .regex import * File "C:\scoop\apps\flow-launcher\current\app-1.9.5\UserData\Plugins\Spell Checker-0.1.0\lib\regex\regex.py", line 421, in import regex._regex_core as _regex_core File "C:\scoop\apps\flow-launcher\current\app-1.9.5\UserData\Plugins\Spell Checker-0.1.0\lib\regex_regex_core.py", line 21, in import regex._regex as _regex ModuleNotFoundError: No module named 'regex._regex'

at Flow.Launcher.Core.Plugin.JsonRPCPlugin.ExecuteAsync(ProcessStartInfo startInfo, CancellationToken token) in C:\projects\flow-launcher\Flow.Launcher.Core\Plugin\JsonRPCPlugin.cs:line 288 at Flow.Launcher.Core.Plugin.JsonRPCPlugin.ExecuteAsync(ProcessStartInfo startInfo, CancellationToken token) in C:\projects\flow-launcher\Flow.Launcher.Core\Plugin\JsonRPCPlugin.cs:line 302 at Flow.Launcher.Core.Plugin.JsonRPCPlugin.QueryAsync(Query query, CancellationToken token) in C:\projects\flow-launcher\Flow.Launcher.Core\Plugin\JsonRPCPlugin.cs:line 322 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 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 213 --- 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 213 at Flow.Launcher.ViewModel.MainViewModel.<>cDisplayClass137_0.<gQueryTask|2>d.MoveNext() in C:\projects\flow-launcher\Flow.Launcher\ViewModel\MainViewModel.cs:line 626 --- End of stack trace from previous location --- at Flow.Launcher.ViewModel.MainViewModel.QueryResults() in C:\projects\flow-launcher\Flow.Launcher\ViewModel\MainViewModel.cs:line 627 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)

Garulf commented 1 year ago

I think I see the issue. I didn't realize one of the packages this plugin relies on uses compiled C code and is not purely Python. This seems to cause issues when trying to distribute across different systems.

If you’re familiar with Python and pip you can follow these steps:

In the mean time I'll try and find a workaround for fixing this issue.

KyleKolander commented 1 year ago

I tried those steps but it fails. First because I didn't have the C++ Build Tools (at least v14), so I installed the C++ Desktop workload in VS2022. Then it fails later on due to the regex package: Running setup.py install for regex did not run successfully. I use pypy, not sure if that would have anything to do with it?

build\lib.win32-pypy39\regex_regex.pypy39-pp73-win_amd64.pyd : fatal error LNK1120: 94 unresolved externals error: command 'C:\vs\VC\Tools\MSVC\14.33.31629\bin\HostX86\x86\link.exe' failed with exit code 1120