我使用命令pip install autocorrect安装了autocorrect软件包,但示例代码如下:
from autocorrect import Speller
check = Speller(lang='en')
check("does this sentece have misspelled wordz?")
给我这个错误,它在包文件中:
Traceback (most recent call last): File "D:\a.b.k\study\testauto.py", line 3, in check = Speller(lang='en') File "C:\Users\Abdelrahman Bonna\AppData\Local\Programs\Python\Python35-32\lib\site-packages\autocorrect__init__.py", line 58, in init self.nlp_data = load_from_tar(lang) File "C:\Users\Abdelrahman Bonna\AppData\Local\Programs\Python\Python35-32\lib\site-packages\autocorrect__init__.py", line 52, in load_from_tar return json.load(file) File "C:\Users\Abdelrahman Bonna\AppData\Local\Programs\Python\Python35-32\lib\json__init__.py", line 268, in load parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw) File "C:\Users\Abdelrahman Bonna\AppData\Local\Programs\Python\Python35-32\lib\json__init__.py", line 312, in loads s.class.name)) TypeError: the JSON object must be str, not 'bytes'
我在这个软件包中使用Python3.5,破坏了Windows10
目前没有回答
相关问题 更多 >
编程相关推荐