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

Anaconda: Installer sync failed #87

Closed
shankerwangmiao opened this issue Aug 14, 2020 · 1 comment
Closed

Anaconda: Installer sync failed #87

shankerwangmiao opened this issue Aug 14, 2020 · 1 comment

Comments

@shankerwangmiao
Copy link
Member

remote_filesize = int(r.headers['content-length'])

[2020-08-13 22:36:59,004] [INFO] Syncing installers...
[2020-08-13 22:36:59,005] [INFO] Start syncing https://repo.continuum.io/archive
[2020-08-13 22:37:01,967] [ERROR] Failed to sync installers of archive
Traceback (most recent call last):
  File "/home/scripts/anaconda.py", line 270, in main
    sync_installer(remote_url, local_dir)
  File "/home/scripts/anaconda.py", line 216, in sync_installer
    remote_filesize = int(r.headers['content-length'])
  File "/usr/local/lib/python3.7/dist-packages/requests/structures.py", line 54, in __getitem__
    return self._store[key.lower()][1]
KeyError: 'content-length'

ref: tuna/issues#915

@holymonson
Copy link

这里加参数allow_redirects=True也许就可以了

r = requests.get(repo_url, timeout=TIMEOUT_OPTION)

@z4yx z4yx closed this as completed in de3629d Aug 15, 2020
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

2 participants