How did you create the files in 0_MSPFormat_Files? They appear to be .zip, not /tar.gz:
>>> import gzip
>>> filename = "0_MSPFormat_Files/Problem_01.tar.gz"
>>> f_in = gzip.open(filename, "r")
>>> f_in.peek(10)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/oscar/opt/anaconda3/lib/python3.7/gzip.py", line 296, in peek
return self._buffer.peek(n)
File "/Users/oscar/opt/anaconda3/lib/python3.7/_compression.py", line 68, in readinto
data = self.read(len(byte_view))
File "/Users/oscar/opt/anaconda3/lib/python3.7/gzip.py", line 463, in read
if not self._read_gzip_header():
File "/Users/oscar/opt/anaconda3/lib/python3.7/gzip.py", line 411, in _read_gzip_header
raise OSError('Not a gzipped file (%r)' % magic)
OSError: Not a gzipped file (b'PK')
How did you create the files in
0_MSPFormat_Files
? They appear to be.zip
, not/tar.gz
: