barrust / pyspellchecker

Pure Python Spell Checking http://pyspellchecker.readthedocs.io/en/latest/
MIT License
691 stars 101 forks source link

Error in load file function #151

Closed oren-ron closed 11 months ago

oren-ron commented 11 months ago

I stumbled upon an error being raised by the function load_file in utils.py (line 95) that is called from spellchecker.py (line 436). The error I got: "..\spellchecker\utils.py", line 105, in load_file if filename[-3:].lower() == ".gz":


TypeError: 'WindowsPath' object is not subscriptable
barrust commented 11 months ago

This error is because the library doesn't officially offer support for Path objects. I am working on a full solution to ensure that path objects are supported in full.