Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UnicodeDecodeError when importing module #117

Open
filemon11 opened this issue Dec 17, 2024 · 0 comments
Open

UnicodeDecodeError when importing module #117

filemon11 opened this issue Dec 17, 2024 · 0 comments

Comments

@filemon11
Copy link

When trying to import wordfreq via import wordfreq I get the following error:

  File "<stdin>", line 1, in <module>
  File "/home/lukasm/Applications/miniforge3/envs/rocm/lib/python3.12/site-packages/wordfreq/__init__.py", line 17, in <module>
    from wordfreq.tokens import lossy_tokenize, simple_tokenize, tokenize
  File "/home/lukasm/Applications/miniforge3/envs/rocm/lib/python3.12/site-packages/wordfreq/tokens.py", line 8, in <module>
    from ftfy.fixes import uncurl_quotes
  File "/home/lukasm/Applications/miniforge3/envs/rocm/lib/python3.12/site-packages/ftfy/__init__.py", line 23, in <module>
    from ftfy import bad_codecs, chardata, fixes
  File "/home/lukasm/Applications/miniforge3/envs/rocm/lib/python3.12/site-packages/ftfy/chardata.py", line 59, in <module>
    ENCODING_REGEXES = _build_regexes()
                       ^^^^^^^^^^^^^^^^
  File "/home/lukasm/Applications/miniforge3/envs/rocm/lib/python3.12/site-packages/ftfy/chardata.py", line 47, in _build_regexes
    charlist = byte_range.decode(encoding)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lukasm/Applications/miniforge3/envs/rocm/lib/python3.12/site-packages/future_typing/codec.py", line 23, in decode
    first_line = lines[0].decode("utf-8", errors)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 0: invalid start byte
decoding with 'sloppy-windows-1252' codec failed

I'm running Python 3.12 and have install wordfreq 3.1.1 via pip.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant