当我尝试解压缩 wikipedia 转储以使用其 .xml 文件时出现此错误。我该如何解决?
filepath='/Data/nlp/ESA/Wiki-ESA-master'
file_name='enwiki-latest-pages-articles.xml.bz2'
zipfile = bz2.BZ2File(file_name) # open the file
DEFAULT_FILENAME = zipfile.read() # get the decompressed data
错误:
EOFError: compressed file ended before the logical end-of-stream was detected