tuxity / insta-unfollower

An Instagram script to unfollow accounts who doesn't follow-you-back
MIT License
381 stars 89 forks source link

KeyError('name=%r, domain=%r, path=%r' % (name, domain, path)) #9

Closed dghido closed 6 years ago

dghido commented 6 years ago

Hi, script return an error.

Traceback (most recent call last): File "insta-unfollower.py", line 209, in <module> main() File "insta-unfollower.py", line 167, in main is_logged = login() File "insta-unfollower.py", line 42, in login 'X-CSRFToken': reponse.cookies['csrftoken'] File "/Users/davide/anaconda3/lib/python3.6/site-packages/requests/cookies.py", line 327, in __getitem__ return self._find_no_duplicates(name) File "/Users/davide/anaconda3/lib/python3.6/site-packages/requests/cookies.py", line 398, in _find_no_duplicates raise KeyError('name=%r, domain=%r, path=%r' % (name, domain, path)) KeyError: "name='csrftoken', domain=None, path=None" how could I solve?

thank you

joshlachkovic commented 6 years ago

Same

tuxity commented 6 years ago

Hi,

Just tested on local and I'm unable to reproduce the problem. Can you give more informations?

goord0n commented 5 years ago

Hello, same here Python 3.7.1 running on windows 10

itzmeak commented 5 years ago

Hi added USERNAME value PASSWORD value as environment variables. Tried running python insta-unfollower.py -USERNAME -PASSWORD And I get following error:

Traceback (most recent call last): File "insta-unfollower.py", line 235, in main() File "insta-unfollower.py", line 192, in main is_logged = login() File "insta-unfollower.py", line 42, in login 'X-CSRFToken': reponse.cookies['csrftoken'] File "C:\Program Files\Python\lib\site-packages\requests\cookies.py", line 328, in getitem return self._find_no_duplicates(name) File "C:\Program Files\Python\lib\site-packages\requests\cookies.py", line 399, in _find_no_duplicates raise KeyError('name=%r, domain=%r, path=%r' % (name, domain, path)) KeyError: "name='csrftoken', domain=None, path=None"

I am using windows 10 and Python 3.6.4

Thank you

badroumari commented 3 years ago

this problem is occured because of html5lib try to change it with lxml exemple of use soup=BeautifulSoup(response.content,'html5lib') change it to soup=BeautifulSoup(response.content,'lxml') hope its solve your problem