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

Google "gzip_compression" UnicodeDecodeError #46

Open
arkountos opened this issue Feb 27, 2024 · 0 comments
Open

Google "gzip_compression" UnicodeDecodeError #46

arkountos opened this issue Feb 27, 2024 · 0 comments

Comments

@arkountos
Copy link

arkountos commented Feb 27, 2024

Hello all,

I tried running on an Ubuntu vm the gzip_compression benchmark using functions-framework.
I kept getting this error on the gz.writelines(f) line:

File "<frozen codecs>", line 322, in decode
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x87 in position 3: invalid start byte

After looking around, I got to solve it by opening the file in binary mode, so changing
with open(file_write_path) as f:
to
with open(file_write_path, 'rb') as f:

Now the benchmarks runs, should we add this to the repository?

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