Skip to content

Google "gzip_compression" UnicodeDecodeError #46

@arkountos

Description

@arkountos

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions