Closed bombyy closed 2 years ago
That is odd. I am unable to reproduce this issue.
Can you confirm which version of pyspellchecker you are using?
Also, is this being run as an executable? There have been reports of issues similar to this when a script is converted into an executable. There are workarounds, if that is the case, but nothing that can be done from the library directly (that I have found)
It is odd that your code in the message above shows something I can't find in previous versions, specifically spellpipchecker
:
pkgutil.get_data("spellpipchecker", filename)
That is odd. I am unable to reproduce this issue.
Can you confirm which version of pyspellchecker you are using?
Also, is this being run as an executable? There have been reports of issues similar to this when a script is converted into an executable. There are workarounds, if that is the case, but nothing that can be done from the library directly (that I have found)
It is odd that your code in the message above shows something I can't find in previous versions, specifically
spellpipchecker
:pkgutil.get_data("spellpipchecker", filename)
Oh oops the "spellpipchecker" is not actually in there I failed to copy correctly. I corrected that part in the original issue. I'm using pyspellchecker version 0.6.2 with Python 3.8.10 on Ubuntu 20.04.
I will take a look at the workarounds.
OK, I tried a pip install to a new conda environment and still didn't get the issue. I too am on a linux box. Are you using a pyinstaller or similar system to make it into an executable?
No, I'm running it "normally". Seems odd to me too, pkgutil.get_data seems to be working normaly except for this instance :/
Installing from source seems to resolve the issue :thinking:
That is really odd. My pip install into conda worked. OK, I think I have enough changes to push a new version out so I will try to do that today. Perhaps we can test again using pip when that drops.
Sorry, I will try it out when I'm back home.
@bombyy, I am going to close this issue. If it isn't resolve, please reopen.
Hey, I found an issue with this module that resulted in a jsonDecodeError when initializing the spellchecker class.
The Error Message:
It seems like the
json.loads
function in line 67 ofspellchecker.py
doesn't receive data from the dictionary being read. Thepkgutil.get_data("spellchecker", filename)
in line 59 seems to returnNone
when run. I replaced it temporarily withopen(<absolute path>{filename}, "rb").read()
and now it seems to work, but I can't figure out whypkgutil.get_data()
is returningNone
.