Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tarfile.ReadError: file could not be opened successfully #30

Open
RSteendam opened this issue Jun 1, 2022 · 2 comments
Open

tarfile.ReadError: file could not be opened successfully #30

RSteendam opened this issue Jun 1, 2022 · 2 comments

Comments

@RSteendam
Copy link

RSteendam commented Jun 1, 2022

I could not get depccg to work. I first tried installing via pip, then I cloned the repo and tried:

pip install -U cython
python setup.py clean
python setup.py build_ext --inplace
python setup.py install  

However, in both cases, running the depccg_en download then gives:

  warnings.warn('''\
2022-06-01 10:34:05,848 - INFO - root - start downloading from 1mxl1HU99iEQcUYhWhvkowbE4WOH0UKxv
Downloading 1mxl1HU99iEQcUYhWhvkowbE4WOH0UKxv into /Users/ruben/github/depccg/depccg/models/tri_headfirst.tar.gz... Done.
2022-06-01 10:34:06,273 - INFO - root - extracting files
Traceback (most recent call last):
  File "/Users/ruben/.pyenv/versions/3.8.13/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/Users/ruben/.pyenv/versions/3.8.13/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/Users/ruben/github/depccg/depccg/__main__.py", line 166, in <module>
    parse_args(main)
  File "/Users/ruben/github/depccg/depccg/argparse.py", line 203, in parse_args
    args.func(args)
  File "/Users/ruben/github/depccg/depccg/argparse.py", line 112, in <lambda>
    func=lambda args: download(args.lang, args.VARIANT)
  File "/Users/ruben/github/depccg/depccg/instance_models.py", line 108, in download
    tf = tarfile.open(filename)
  File "/Users/ruben/.pyenv/versions/3.8.13/lib/python3.8/tarfile.py", line 1608, in open
    raise ReadError("file could not be opened successfully")
tarfile.ReadError: file could not be opened successfully

MBP Pro 2021 (M1 Pro), macOS 12.4
python3.8.13
numpy==1.22.4
Cython==0.29.30
Clang:
Apple clang version 13.1.6 (clang-1316.0.21.2.5)
Target: arm64-apple-darwin21.5.0

@RSteendam
Copy link
Author

tri_headfirst.tar.gz is only a 2KB file.

@RSteendam
Copy link
Author

Manually downloading and extracting the archive fixed this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant