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: 'NoneType' object has no attribute 'status_code' #80

Open
jasonkarns opened this issue Apr 27, 2024 · 1 comment
Open

Comments

@jasonkarns
Copy link

Given:

$ waybackpack --uniques-only --no-clobber --follow-redirects --ignore-errors -d StevenHarman 'http://feeds.stevenharman.net/stevenharman' --from-date=20090220053814

I get:

INFO:waybackpack.session: HTTP status code: 504
INFO:waybackpack.session: Waiting 1 second before retrying.
INFO:waybackpack.session: Waiting 1 second before retrying.
INFO:waybackpack.session: HTTP status code: 503
INFO:waybackpack.session: Waiting 1 second before retrying.
INFO:waybackpack.session: Waiting 1 second before retrying.
INFO:waybackpack.session: HTTP status code: 503
INFO:waybackpack.session: Waiting 1 second before retrying.
INFO:waybackpack.session: Waiting 1 second before retrying.
INFO:waybackpack.session: HTTP status code: 503
INFO:waybackpack.session: Waiting 1 second before retrying.
INFO:waybackpack.session: Maximum retries reached, skipping.
Traceback (most recent call last):
  File "/opt/homebrew/bin/waybackpack", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/waybackpack/cli.py", line 130, in main
    snapshots = search(
                ^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/waybackpack/cdx.py", line 27, in search
    if res.status_code == 200:
       ^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'status_code'
@jsvine
Copy link
Owner

jsvine commented May 1, 2024

Based on the line numbers in the stack trace, my hunch is that you're on version 0.6.1 or earlier. Version 0.6.2 should handle that conditional more gracefully. Let me know if not.

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