I’ve encountered these strange OverflowErrors intermittently — but I have trouble finding out what is causing it since I can’t very easily find out what is inside the session objects (if you know how might do that, let me know!)
It seems to me that something inside the session is causing Overflows, but there is only dicts and lists inside the sessions so I am not sure what could cause this.
Traceback (most recent call last):
File "/path/to/lib/python3.7/site-packages/sanic/app.py", line 977, in handle_request
request, response, request_name=name
File "/path/to/lib/python3.7/site-packages/spf/framework.py", line 686, in _run_response_middleware_19_12
_response = await _response
File "/path/to/lib/python3.7/site-packages/sanic_session/__init__.py", line 41, in save_session
await self.interface.save(request, response)
File "/path/to/lib/python3.7/site-packages/sanic_session/base.py", line 156, in save
val = ujson.dumps(dict(req[self.session_name]))
OverflowError: Maximum recursion level reached
Any help would be appreciated!
Versions:
sanic==20.6.3
sanic-session==0.7.3