UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8b in position 1: invalid start byte

Hi Ivan, welcome to the forum.

Before future posts, please read the pinned thread to understand how to post code properly. This time the problem is simple, but normally we need to see the code properly, or it won’t be possible to analyze it.

This file contains compressed data, not text. Therefore, please open it in binary mode.

In Python 3, using text mode (the default) for a file will decode the text (to make a proper Unicode string) for you. But this can only work if it actually is text, and the encoding is correct.

As a reminder, 2.7 is not supported. It has not been, for more than 4 years.