Skip to content

Fix encoding error on Python +3.8 #1

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

GavinRay97
Copy link

❯ python main.py 
Converting api/reascripthelp.html to vscode_snippets/reascript.code-snippets ...
Build of vscode_snippets/reascript.code-snippets done !
Converting api/reaper-videoprocessor-docs.USDocML to vscode_snippets/reascript_vp.code-snippets ...
Build of vscode_snippets/reascript_vp.code-snippets done !
Converting api/reaper-apidocs.USDocML to vscode_snippets/reascript_usdoc.code-snippets ...
Build of vscode_snippets/reascript_usdoc.code-snippets done !
Converting api/ultraschall.USDocML to vscode_snippets/ultraschall.code-snippets ...
Traceback (most recent call last):
  File "main.py", line 150, in <module>
    doc_data: AnyStr = f.read()
  File "/usr/lib/python3.8/codecs.py", line 322, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb0 in position 1688214: invalid start byte

https://stackoverflow.com/questions/42339876/error-unicodedecodeerror-utf-8-codec-cant-decode-byte-0xff-in-position-0-in

```sh
❯ python main.py 
Converting api/reascripthelp.html to vscode_snippets/reascript.code-snippets ...
Build of vscode_snippets/reascript.code-snippets done !
Converting api/reaper-videoprocessor-docs.USDocML to vscode_snippets/reascript_vp.code-snippets ...
Build of vscode_snippets/reascript_vp.code-snippets done !
Converting api/reaper-apidocs.USDocML to vscode_snippets/reascript_usdoc.code-snippets ...
Build of vscode_snippets/reascript_usdoc.code-snippets done !
Converting api/ultraschall.USDocML to vscode_snippets/ultraschall.code-snippets ...
Traceback (most recent call last):
  File "main.py", line 150, in <module>
    doc_data: AnyStr = f.read()
  File "/usr/lib/python3.8/codecs.py", line 322, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb0 in position 1688214: invalid start byte
```

https://stackoverflow.com/questions/42339876/error-unicodedecodeerror-utf-8-codec-cant-decode-byte-0xff-in-position-0-in
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

Successfully merging this pull request may close these issues.

1 participant