You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
from pysblgnt import morphgnt_rows for row in morphgnt_rows(1): print(row)
...
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\ProgramData\Anaconda3\envs\greek\lib\site-packages\pysblgnt\__init__.py", line 29, in morphgnt_rows
for line in f:
File "C:\ProgramData\Anaconda3\envs\greek\lib\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 275: character maps to <undefined>
As far as I can tell, this is a Windows thing, where by default utf-8 is not used with open. When importing this as a module then, it's not possible to open the files correctly.
Reference: http://www.macfreek.nl/memory/Encoding_of_Python_stdout (EDIT: Ok maybe that's not the appropriate link since that talks about writing out for files rather than reading them in, but it's the same thing going on. Line 28 of __init.py with open(filename) as f: fails for me because utf-8 encoding isn't specified.)
The text was updated successfully, but these errors were encountered:
from pysblgnt import morphgnt_rows
for row in morphgnt_rows(1): print(row)
As far as I can tell, this is a Windows thing, where by default utf-8 is not used with
open
. When importing this as a module then, it's not possible to open the files correctly.Reference: http://www.macfreek.nl/memory/Encoding_of_Python_stdout (EDIT: Ok maybe that's not the appropriate link since that talks about writing out for files rather than reading them in, but it's the same thing going on. Line 28 of __init.py
with open(filename) as f:
fails for me because utf-8 encoding isn't specified.)The text was updated successfully, but these errors were encountered: