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

tri_headfirst.tar.gz downloads as an HTML file, not a .tar.gz file #36

Open
axb21 opened this issue Nov 2, 2022 · 0 comments
Open

tri_headfirst.tar.gz downloads as an HTML file, not a .tar.gz file #36

axb21 opened this issue Nov 2, 2022 · 0 comments

Comments

@axb21
Copy link

axb21 commented Nov 2, 2022

Following the install instructions, I executed depccg_en download. This is what happened:

username@localhost:~$ depccg_en download
/usr/lib/python3/dist-packages/pkg_resources/__init__.py:116: PkgResourcesDeprecationWarning: 1.16.0-unknown is an invalid version and will not be supported in a future release
  warnings.warn(
/usr/lib/python3/dist-packages/pkg_resources/__init__.py:116: PkgResourcesDeprecationWarning: 0.1.43ubuntu1 is an invalid version and will not be supported in a future release
  warnings.warn(
/usr/lib/python3/dist-packages/pkg_resources/__init__.py:116: PkgResourcesDeprecationWarning: 1.1build1 is an invalid version and will not be supported in a future release
  warnings.warn(
2022-11-02 10:39:13,164 - INFO - root - start downloading from 1mxl1HU99iEQcUYhWhvkowbE4WOH0UKxv
Downloading 1mxl1HU99iEQcUYhWhvkowbE4WOH0UKxv into /home/username/.local/lib/python3.10/site-packages/depccg/models/tri_headfirst.tar.gz... Done.
2022-11-02 10:39:13,535 - INFO - root - extracting files
Traceback (most recent call last):
  File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/home/username/.local/lib/python3.10/site-packages/depccg/__main__.py", line 166, in <module>
    parse_args(main)
  File "/home/username/.local/lib/python3.10/site-packages/depccg/argparse.py", line 203, in parse_args
    args.func(args)
  File "/home/username/.local/lib/python3.10/site-packages/depccg/argparse.py", line 112, in <lambda>
    func=lambda args: download(args.lang, args.VARIANT)
  File "/home/username/.local/lib/python3.10/site-packages/depccg/instance_models.py", line 108, in download
    tf = tarfile.open(filename)
  File "/usr/lib/python3.10/tarfile.py", line 1639, in open
    raise ReadError(f"file could not be opened successfully:\n{error_msgs_summary}")
tarfile.ReadError: file could not be opened successfully:
- method gz: ReadError('not a gzip file')
- method bz2: ReadError('not a bzip2 file')
- method xz: ReadError('not an lzma file')
- method tar: ReadError('invalid header')

The error seems to be telling me that tri_headfirst.tar.gz is not the expected file type. Checking it with file:

username@localhost:~$ file /home/username/.local/lib/python3.10/site-packages/depccg/models/tri_headfirst.tar.gz
/home/username/.local/lib/python3.10/site-packages/depccg/models/tri_headfirst.tar.gz: HTML document, ASCII text, with very long lines (2035)

The contents of the file, if it helps:

<!DOCTYPE html><html><head><title>Google Drive - Virus scan warning</title><meta http-equiv="content-type" content="text/html; charset=utf-8"/><style nonce="C7JrQ_bxZ2npIv_xsTlBUg">/* Copyright 2022 Google Inc. All Rights Reserved. */
.goog-inline-block{position:relative;display:-moz-inline-box;display:inline-block}* html .goog-inline-block{display:inline}*:first-child+html .goog-inline-block{display:inline}.goog-link-button{position:relative;color:#15c;text-decoration:underline;cursor:pointer}.goog-link-button-disabled{color:#ccc;text-decoration:none;cursor:default}body{color:#222;font:normal 13px/1.4 arial,sans-serif;margin:0}.grecaptcha-badge{visibility:hidden}.uc-main{padding-top:50px;text-align:center}#uc-dl-icon{display:inline-block;margin-top:16px;padding-right:1em;vertical-align:top}#uc-text{display:inline-block;max-width:68ex;text-align:left}.uc-error-caption,.uc-warning-caption{color:#222;font-size:16px}#uc-download-link{text-decoration:none}.uc-name-size a{color:#15c;text-decoration:none}.uc-name-size a:visited{color:#61c;text-decoration:none}.uc-name-size a:active{color:#d14836;text-decoration:none}.uc-footer{color:#777;font-size:11px;padding-bottom:5ex;padding-top:5ex;text-align:center}.uc-footer a{color:#15c}.uc-footer a:visited{color:#61c}.uc-footer a:active{color:#d14836}.uc-footer-divider{color:#ccc;width:100%}</style><link rel="icon" href="null"/></head><body><div class="uc-main"><div id="uc-dl-icon" class="image-container"><div class="drive-sprite-aux-download-file"></div></div><div id="uc-text"><p class="uc-warning-caption">Google Drive can't scan this file for viruses.</p><p class="uc-warning-subcaption"><span class="uc-name-size"><a href="/open?id=1mxl1HU99iEQcUYhWhvkowbE4WOH0UKxv">tri_headfirst.tar.gz</a> (189M)</span> is too large for Google to scan for viruses. Would you still like to download this file?</p><form id="downloadForm" action="https://docs.google.com/uc?export=download&amp;id=1mxl1HU99iEQcUYhWhvkowbE4WOH0UKxv&amp;confirm=t&amp;uuid=02449c1a-bdbb-40bb-b114-d77c9c61b6ea" method="post"><input type="submit" id="uc-download-link" class="goog-inline-block jfk-button jfk-button-action" value="Download anyway"/></form></div></div><div class="uc-footer"><hr class="uc-footer-divider"></div></body></html>

Net result is that the installation procedures don't work in my environment as written, and it would seem they wouldn't work for anyone else either?

If I'm reading the HTML contents right it appears this code is trying to download tri_headfirst.tar.gz from Google Drive, which is not great if true.

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