2

code:

newsgroups_train = fetch_20newsgroups(subset='train')

error:

Traceback (most recent call last):

File "create_tsv.py", line 10, in <module>

newsgroups_train = fetch_20newsgroups(subset='train')

File "/usr/lib/python2.7/dist-packages/sklearn/datasets/twenty_newsgroups.py", line 207, in fetch_20newsgroups
cache_path=cache_path)

File "/usr/lib/python2.7/dist-packages/sklearn/datasets/twenty_newsgroups.py", line 89, in download_20newsgroups
    tarfile.open(archive_path, "r:gz").extractall(path=target_dir)

File "/usr/lib/python2.7/tarfile.py", line 1678, in open
    return func(name, filemode, fileobj, **kwargs)

File "/usr/lib/python2.7/tarfile.py", line 1727, in gzopen
**kwargs)

File "/usr/lib/python2.7/tarfile.py", line 1705, in taropen
    return cls(name, mode, fileobj, **kwargs)

File "/usr/lib/python2.7/tarfile.py", line 1574, in __init__
    self.firstmember = self.next()

File "/usr/lib/python2.7/tarfile.py", line 2338, in next
    raise ReadError("empty file")

tarfile.ReadError: empty file
Loïc Poncin
  • 511
  • 1
  • 11
  • 30
BoomKa
  • 81
  • 1
  • 9

0 Answers0