scratchclient icon indicating copy to clipboard operation
scratchclient copied to clipboard

KeyError: 'set-cookie' [bug]

Open nottisa opened this issue 3 years ago • 7 comments

This is an error I get on a fresh install and the only code is the login code. This is running on replit.

    self.login(password)
  File "/home/runner/scratchbot/venv/lib/python3.8/site-packages/scratchclient/ScratchSession.py", line 66, in login
    self.session_id = re.search('"(.*)"', request.headers["Set-Cookie"]).group()
  File "/home/runner/scratchbot/venv/lib/python3.8/site-packages/requests/structures.py", line 52, in __getitem__
    return self._store[key.lower()][1]
KeyError: 'set-cookie'```

nottisa avatar Oct 13 '22 21:10 nottisa

I saw the replit thing... but I still get this error:

  File "/home/runner/scratchbot/venv/lib/python3.8/site-packages/scratchclient/ScratchSession.py", line 34, in __init__
    self.get_csrf_token()
  File "/home/runner/scratchbot/venv/lib/python3.8/site-packages/scratchclient/ScratchSession.py", line 83, in get_csrf_token
    "scratchcsrftoken=(.*?);", request.headers["Set-Cookie"]
  File "/home/runner/scratchbot/venv/lib/python3.8/site-packages/requests/structures.py", line 52, in __getitem__
    return self._store[key.lower()][1]
KeyError: 'set-cookie'
 

nottisa avatar Oct 13 '22 21:10 nottisa

This happens when your login credentials are incorrect.

CubeyTheCube avatar Oct 31 '22 23:10 CubeyTheCube

Minus the part where the credentials are correct.

nottisa avatar Oct 31 '22 23:10 nottisa

on replit scratch auth has broken use cookie auth, without username and pass

noverd avatar Nov 22 '22 15:11 noverd

I saw that post. I tried using the cookie, and it didn't work. Sooooo

nottisa avatar Nov 22 '22 18:11 nottisa

Hi, I am having the same issue, this is getting pretty bad

JustAnEric avatar Mar 07 '23 10:03 JustAnEric

It's probably not going to be fixed soon as this repo is no longer updated. I could be wrong, but right now I have no time to update it.

nottisa avatar Mar 07 '23 16:03 nottisa