EOFError: Compressed file ended before the end-of-stream marker was reached (on Google Colab)?
Alla-Abdella opened this issue · 0 comments
This is my code to open the data:
jsonfilename = "/content/v1.0-simplified_nq-dev-all.jsonl.gz"
with gzip.open(jsonfilename, 'r') as fin:
data = json.loads(fin.read().decode('utf-8'))
However, I'm getting this error:
EOFError Traceback (most recent call last)
in ()
8 jsonfilename = "/content/v1.0-simplified_nq-dev-all.jsonl.gz"
9 with gzip.open(jsonfilename, 'r') as fin:
---> 10 data = json.loads(fin.read().decode('utf-8'))
1 frames
/usr/lib/python3.7/gzip.py in read(self, size)
491 break
492 if buf == b"":
--> 493 raise EOFError("Compressed file ended before the "
494 "end-of-stream marker was reached")
495
EOFError: Compressed file ended before the end-of-stream marker was reached