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

"list index out of range" if the cookies.txt file don't contain "auth_token" record #36

Closed
jim60105 opened this issue Jan 16, 2022 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@jim60105
Copy link
Contributor

Describe the bug
list index out of range if the cookies.txt file don't contain auth_token record

To Reproduce
Pass an empty cookies.txt file in it.

Expected behavior
I suggest making errors easier to read.
Or outputting warnings and fallback to unlogined methods.

Output

Traceback (most recent call last):
  File "/venv/bin/twspace_dl", line 8, in <module>
    sys.exit(main())
  File "/venv/lib/python3.10/site-packages/twspace_dl/__main__.py", line 116, in main
    args.func(args)
  File "/venv/lib/python3.10/site-packages/twspace_dl/__main__.py", line 153, in twspace
    auth_token = load_from_file(args.input_cookie_file)
  File "/venv/lib/python3.10/site-packages/twspace_dl/login.py", line 9, in load_from_file
    return re.findall(
IndexError: list index out of range
@jim60105 jim60105 added the bug Something isn't working label Jan 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants