You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi - I've updated the trec_car library to the latest update. With the following code I received the error message I posted below:
from trec_car.read_data import *
ct = 0
with open("../release-v2.0/paragraphCorpus/dedup.articles-paragraphs.cbor", 'rb') as f: #16GB
for p in iter_paragraphs(f):
ct += 1
##########
AssertionError
Traceback (most recent call last)
in ()
4
5 with open("../release-v2.0/paragraphCorpus/dedup.articles-paragraphs.cbor", 'rb') as f: #16GB
----> 6 for p in iter_paragraphs(f):
7 ct += 1
8 print (ct)
~/anaconda2/envs/py36/lib/python3.6/site-packages/trec_car/read_data.py in iter_paragraphs(file)
246 while True:
247 try:
--> 248 yield Paragraph.from_cbor(cbor.load(file))
249 except EOFError:
250 break
Hi - I've updated the trec_car library to the latest update. With the following code I received the error message I posted below:
from trec_car.read_data import *
ct = 0
with open("../release-v2.0/paragraphCorpus/dedup.articles-paragraphs.cbor", 'rb') as f: #16GB
for p in iter_paragraphs(f):
ct += 1
##########
AssertionError
Traceback (most recent call last)
in ()
4
5 with open("../release-v2.0/paragraphCorpus/dedup.articles-paragraphs.cbor", 'rb') as f: #16GB
----> 6 for p in iter_paragraphs(f):
7 ct += 1
8 print (ct)
~/anaconda2/envs/py36/lib/python3.6/site-packages/trec_car/read_data.py in iter_paragraphs(file)
246 while True:
247 try:
--> 248 yield Paragraph.from_cbor(cbor.load(file))
249 except EOFError:
250 break
~/anaconda2/envs/py36/lib/python3.6/site-packages/trec_car/read_data.py in from_cbor(cbor)
171 @staticmethod
172 def from_cbor(cbor):
--> 173 assert cbor[0] == 0
174 paragraphId = cbor[1].decode('ascii')
175 return Paragraph(paragraphId, map(ParaBody.from_cbor, cbor[2]))
AssertionError:
Am I doing something wrong?
The text was updated successfully, but these errors were encountered: