#1
by
Pipoca
Hi all,
I've deployed an otree project in AWS using also nginx and supervisor. The application can be accessed without issues, but when trying to create a session (a demo or in the sessions menu), it gets stuck in the creating session page.
According to the supervisor logs, there is a type error, but I'm not sure if it's related to the Python version which I used for this project
TypeError: As of 3.10, the *loop* parameter was removed from Lock() since it is no longer necessary
Fatal error: protocol.data_received() call failed.
protocol: <uvicorn.protocols.http.h11_impl.H11Protocol object at 0x7f7f53bb56f0>
transport: <_SelectorSocketTransport fd=9 read=polling write=<idle, bufsize=0>>
Traceback (most recent call last):
File "/usr/lib/python3.10/asyncio/selector_events.py", line 868, in _read_ready__data_received
self._protocol.data_received(data)
File "/home/ubuntu/otree-env/lib/python3.10/site-packages/uvicorn/protocols/http/h11_impl.py", line 167, in data_received
self.handle_events()
File "/home/ubuntu/otree-env/lib/python3.10/site-packages/uvicorn/protocols/http/h11_impl.py", line 216, in handle_events
self.handle_upgrade(event)
File "/home/ubuntu/otree-env/lib/python3.10/site-packages/uvicorn/protocols/http/h11_impl.py", line 293, in handle_upgrade
protocol = self.ws_protocol_class(
File "/home/ubuntu/otree-env/lib/python3.10/site-packages/uvicorn/protocols/websockets/websockets_impl.py", line 58, in __init__
super().__init__(
File "/home/ubuntu/otree-env/lib/python3.10/site-packages/websockets/server.py", line 103, in __init__
super().__init__(**kwargs)
File "/home/ubuntu/otree-env/lib/python3.10/site-packages/websockets/protocol.py", line 235, in __init__
self._drain_lock = asyncio.Lock(
File "/usr/lib/python3.10/asyncio/locks.py", line 78, in __init__
super().__init__(loop=loop)
File "/usr/lib/python3.10/asyncio/mixins.py", line 17, in __init__
#2
by
Pipoca
Turnsout it was the Python version. I deployed it with Python 3.7.15 and it's not throwing any issue when creating a session. Hope this helps anyone in a similar situation!