instaloader / instaloader

Download pictures (or videos) along with their captions and other metadata from Instagram.
https://instaloader.github.io/
MIT License
8.52k stars 1.15k forks source link

File "/usr/local/lib/python3.10/site-packages/requests/cookies.py", line 413, in _find_no_duplicates raise KeyError(f"name={name!r}, domain={domain!r}, path={path!r}") #1773

Closed Drjacky closed 1 year ago

Drjacky commented 1 year ago
Traceback (most recent call last):
  File "/usr/local/bin/instaloader", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.10/site-packages/instaloader/__main__.py", line 471, in main
    _main(loader,
  File "/usr/local/lib/python3.10/site-packages/instaloader/__main__.py", line 121, in _main
    instaloader.interactive_login(username)
  File "/usr/local/lib/python3.10/site-packages/instaloader/instaloader.py", line 1572, in interactive_login
    self.login(username, password)
  File "/usr/local/lib/python3.10/site-packages/instaloader/instaloader.py", line 634, in login
    self.context.login(user, passwd)
  File "/usr/local/lib/python3.10/site-packages/instaloader/instaloadercontext.py", line 265, in login
    session.headers.update({'X-CSRFToken': login.cookies['csrftoken']})
  File "/usr/local/lib/python3.10/site-packages/requests/cookies.py", line 334, in __getitem__
    return self._find_no_duplicates(name)
  File "/usr/local/lib/python3.10/site-packages/requests/cookies.py", line 413, in _find_no_duplicates
    raise KeyError(f"name={name!r}, domain={domain!r}, path={path!r}")
KeyError: "name='csrftoken', domain=None, path=None"

Version: 4.9.5

There was 2FA enabled but when I inserted the code, it said: 2FA error: This code is no longer valid. Please request a new one.. but it was valid and new. So, I disabled the 2FA and I got the above error.

Showmaster3000 commented 1 year ago

Duplicate of #1758.

Drjacky commented 1 year ago

I tried with an account without 2FA, and got this:

Fatal error: Login: Checkpoint required. Point your browser to https://www.instagram.com/challenge/action/AXFOb52balbalblablaban8tQZ/ - follow the instructions, then retry.

And when I click on it, it just asks if it was you or not and change your password. That's it.

Drjacky commented 1 year ago

I used this fork https://github.com/instaloader/instaloader/issues/1758#issuecomment-1272618465 and it work but after a couple of downloads, it displayed 403. and when I logged in again, I get 400 and now the account is disabled!

HubbaBubba666 commented 1 year ago

I use instaloader.exe and since today I always get such an error message:

Traceback (most recent call last): File "main.py", line 505, in File "main.py", line 502, in main File "main.py", line 471, in main File "main.py", line 110, in _main File "instaloader\instaloader.py", line 634, in login File "instaloader\instaloadercontext.py", line 265, in login File "requests\cookies.py", line 328, in getitem File "requests\cookies.py", line 399, in _find_no_duplicates KeyError: "name='csrftoken', domain=None, path=None" [14000] Failed to execute script 'main__' due to unhandled exception!

Drjacky commented 1 year ago

@HubbaBubba666 The best one is 4K Stogram. tested and works perfectly.

Showmaster3000 commented 1 year ago

The instaloader project is not responsible for forks of it. And if you want to use other software you are free to do that. So closing this issue.

Drjacky commented 1 year ago

The issue had not been creating because of the forked one. As you said in your first comment it's for this repo. So, feel free to close it as a Duplicate of https://github.com/instaloader/instaloader/issues/1758

Introducing another software/option was because of helping another person.

Thanks for the repo BTW.