You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error when loading session from 1.11 on 1.12
Looks like a problem was introduced in the code handling deserialization of saved sessions. If the previous session was not serialized.
mark as invalid and delete with invalidate_corrupt
add serializer=None
fallback for loading non serialized sessions
Mention it in docs
Reproduce
Install 1.11
Create session
Install 1.12
restart app
get session
Tested on
pyramid==1.10.8
pyramid-beaker==0.8
File "/home/kotofos/Documents/slashdb/slashdb_venv39/lib/python3.9/site-packages/pyramid/authentication.py", line 1151, in unauthenticated_userid
return request.session.get(self.userid_key)
File "/home/kotofos/Documents/slashdb/slashdb_venv39/lib/python3.9/site-packages/beaker/session.py", line 789, in __getattr__
return getattr(self._session(), attr)
File "/home/kotofos/Documents/slashdb/slashdb_venv39/lib/python3.9/site-packages/beaker/session.py", line 785, in _session
self.__dict__['_sess'] = session_cls(req, **params)
File "/home/kotofos/Documents/slashdb/slashdb_venv39/lib/python3.9/site-packages/beaker/session.py", line 227, in __init__
self.load()
File "/home/kotofos/Documents/slashdb/slashdb_venv39/lib/python3.9/site-packages/beaker/session.py", line 415, in load
session_data = self._decrypt_data(session_data)
File "/home/kotofos/Documents/slashdb/slashdb_venv39/lib/python3.9/site-packages/beaker/session.py", line 372, in _decrypt_data
data = b64decode(session_data)
File "/home/kotofos/Documents/slashdb/slashdb_venv39/lib/python3.9/site-packages/beaker/_compat.py", line 37, in b64decode
return _b64decode(b.encode('ascii'))
AttributeError: 'dict' object has no attribute 'encode'
Workaround
Delete sessions from filesystem or use invalidate_corrupt
The text was updated successfully, but these errors were encountered:
eshizhan
added a commit
to eshizhan/beaker
that referenced
this issue
Jul 8, 2023
Error when loading session from 1.11 on 1.12
Looks like a problem was introduced in the code handling deserialization of saved sessions. If the previous session was not serialized.
#122
8949516
Options:
Reproduce
Tested on
pyramid==1.10.8
pyramid-beaker==0.8
Workaround
Delete sessions from filesystem or use invalidate_corrupt
The text was updated successfully, but these errors were encountered: