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

AttributeError: 'Response' object has no attribute 'is_redirect' #5

Closed
megalous opened this issue Aug 15, 2015 · 2 comments
Closed

Comments

@megalous
Copy link

Hello I got an AttributeError: 'Response' object has no attribute 'is_redirect' while trying to download the Horizon: Daybreaker Modpack 1.0.3 with you downloading script.

The console output with and without gui portable option:

user@user-pc ~ $ python3.4 /home/user/Downloads/curseupdater/downloader.py
96 files to download
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python3.4/threading.py", line 920, in _bootstrap_inner
self.run()
File "/usr/lib/python3.4/threading.py", line 868, in run
self._target(_self._args, *_self._kwargs)
File "/home/user/Downloads/curseupdater/downloader.py", line 67, in goDownloadBackground
doDownload(self.manifestPath.get())
File "/home/user/Downloads/curseupdater/downloader.py", line 146, in doDownload
while fileResponse.is_redirect:
AttributeError: 'Response' object has no attribute 'is_redirect'

user@user-pc ~ $ python3.4 /home/user/Downloads/curseupdater/downloader.py --nogui --portable --manifest /home/user/Downloads/HDB/manifest.json
96 files to download
Traceback (most recent call last):
File "/home/user/Downloads/curseupdater/downloader.py", line 206, in
doDownload(args.manifest)
File "/home/user/Downloads/curseupdater/downloader.py", line 146, in doDownload
while fileResponse.is_redirect:
AttributeError: 'Response' object has no attribute 'is_redirect'

user@user-pc ~ $ python3.4 /home/user/Downloads/curseupdater/downloader.py --nogui --manifest /home/user/Downloads/HDB/manifest.json 96 files to download
Traceback (most recent call last):
File "/home/user/Downloads/curseupdater/downloader.py", line 206, in
doDownload(args.manifest)
File "/home/user/Downloads/curseupdater/downloader.py", line 146, in doDownload
while fileResponse.is_redirect:
AttributeError: 'Response' object has no attribute 'is_redirect'

@gazpachoking
Copy link

This will be because you have an older requests version (is_redirect was added in 2.3.) That being said, a requests session handles those redirects already, so #6 will allow older requests versions to work as this code isn't needed.

@megalous
Copy link
Author

Thank you very much for pointing to the cause of the error. I had to install python3-requests 2.3.0-1 from https://launchpad.net/ubuntu/utopic/amd64/python3-requests/2.3.0-1, because the repositories for Ubuntu 14.04/Linux Mint 17.2 supply only version 2.2.1.

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