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

bugfix base64 file decoding #22

Merged
merged 1 commit into from
May 10, 2024
Merged

Conversation

OscarLuu
Copy link
Member

This PR fixes a bug where the file opener tries to decode files into utf-8 when some files are not necessarily text files.

Opens it in binary mode and base64 encodes this.

Error:

"/home/local/python39_venv/lib/python3.9/site-packages/assetman/compilers.py", line 203, in replacer
    encoded = base64.b64encode(open(path).read())
  File "/home/local/lib/python3.9/codecs.py", line 322, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x89 in position 0: invalid start byte

pyproject.toml Outdated Show resolved Hide resolved
@jehiah jehiah merged commit 17979d5 into bitly:master May 10, 2024
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants