natural-questions icon indicating copy to clipboard operation
natural-questions copied to clipboard

EOFError: Compressed file ended before the end-of-stream marker was reached (on Google Colab)?

Open allaabdella2 opened this issue 3 years ago • 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

allaabdella2 avatar Apr 01 '21 19:04 allaabdella2