Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'NoneType' object has no attribute 'refresh_from_db_if_outdated' #235

Open
frafra opened this issue May 8, 2021 · 0 comments

Comments

@frafra
Copy link

frafra commented May 8, 2021

Clean setup via docker-compose.yml, git revision 93207e1.

server_1  | WebSocket HANDSHAKING /ws/world/sample/ [172.177.0.1:55946]
server_1  | 2021-05-08 16:43:16,128 INFO 140215240431360 django.channels.server runserver WebSocket HANDSHAKING /ws/world/sample/ [172.177.0.1:55946]
server_1  | 2021-05-08 16:43:16,128 DEBUG 140215240431360 daphne.http_protocol http_protocol Upgraded connection ['172.177.0.1', 55946] to WebSocket
server_1  | 2021-05-08 16:43:16,129 DEBUG 140215240431360 daphne.ws_protocol ws_protocol WebSocket ['172.177.0.1', 55946] open and established
server_1  | WebSocket CONNECT /ws/world/sample/ [172.177.0.1:55946]
server_1  | 2021-05-08 16:43:16,129 INFO 140215240431360 django.channels.server runserver WebSocket CONNECT /ws/world/sample/ [172.177.0.1:55946]
server_1  | 2021-05-08 16:43:16,129 DEBUG 140215240431360 daphne.ws_protocol ws_protocol WebSocket ['172.177.0.1', 55946] accepted by application
server_1  | 2021-05-08 16:43:16,129 DEBUG 140215240431360 aioredis connection Parsed Redis URI ('redis', 6379)
server_1  | 2021-05-08 16:43:16,129 DEBUG 140215240431360 aioredis connection Creating tcp connection to ('redis', 6379)
server_1  | 2021-05-08 16:43:16,138 DEBUG 140214508975872 django.db.backends utils (0.002) SELECT "core_world"."version", "core_world"."id", "core_world"."title", "core_world"."config", "core_world"."roles", "core_world"."trait_grants", "core_world"."domain", "core_world"."locale", "core_world"."timezone", "core_world"."feature_flags" FROM "core_world" WHERE "core_world"."id" = 'sample' ORDER BY "core_world"."id" ASC LIMIT 1; args=('sample',)
server_1  | 2021-05-08 16:43:16,139 DEBUG 140215240431360 daphne.ws_protocol ws_protocol Sent WebSocket packet to client for ['172.177.0.1', 55946]
server_1  | 2021-05-08 16:43:16,206 DEBUG 140215240431360 daphne.ws_protocol ws_protocol WebSocket incoming frame on ['172.177.0.1', 55946]
server_1  | 2021-05-08 16:43:16,206 DEBUG 140215240431360 daphne.ws_protocol ws_protocol WebSocket closed for ['172.177.0.1', 55946]
server_1  | WebSocket DISCONNECT /ws/world/sample/ [172.177.0.1:55946]
server_1  | 2021-05-08 16:43:16,206 INFO 140215240431360 django.channels.server runserver WebSocket DISCONNECT /ws/world/sample/ [172.177.0.1:55946]
server_1  | 2021-05-08 16:43:16,207 ERROR 140215240431360 venueless.live.consumers consumers Encountered exception, close socket.
server_1  | Traceback (most recent call last):
server_1  |   File "/app/venueless/live/consumers.py", line 188, in dispatch
server_1  |     return await super().dispatch(message)
server_1  |   File "/usr/local/lib/python3.8/site-packages/channels/consumer.py", line 73, in dispatch
server_1  |     await handler(message)
server_1  |   File "/usr/local/lib/python3.8/site-packages/channels/generic/websocket.py", line 196, in websocket_receive
server_1  |     await self.receive(text_data=message["text"])
server_1  |   File "/usr/local/lib/python3.8/site-packages/channels/generic/websocket.py", line 259, in receive
server_1  |     await self.receive_json(await self.decode_json(text_data), **kwargs)
server_1  |   File "/app/venueless/live/consumers.py", line 124, in receive_json
server_1  |     await self.world.refresh_from_db_if_outdated()
server_1  | AttributeError: 'NoneType' object has no attribute 'refresh_from_db_if_outdated'
server_1  | 2021-05-08 16:43:16,708 DEBUG 140215240431360 aioredis connection Cancelling waiter (<Future cancelled>, [None, None])
server_1  | 2021-05-08 16:43:16,709 DEBUG 140215240431360 aioredis util Waiter future is already done <Future cancelled>

I also tried to create a new world like this:

docker exec -it ${CONTAINER_ID} python manage.py create_world

Still the same error. I used localhost as domain, then I used the resulting URL, replacing HTTPS with HTTP and adding :8880 for the port.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant