错误:tornado.general:WebSocket ... Swampdragon:DoesNotExist:匹配查询不存在

时间:2016-01-07 11:02:54

标签: python django docker tornado swampdragon

我按照第一个教程:http://swampdragon.net/tutorial/part-1-here-be-dragons-and-thats-a-good-thing/

我使用Docker。我不得不打开端口9999和6379并运行如下:

sudo docker run --rm -ti -p 8000:8000 -p 6379:6379 -p 9999:9999 --name swarmdragon --net host -v /DJANGO_PATH/:/swarmdragon swarmdragon-install bash

(无法从没有“-net host”选项的主机访问localhost:9999。不知道原因:/)

当docker容器启动时,我必须启动这些过程:

service redis-server start
./manage.py runsd
./manage.py runserver 0.0.0.0:8000

一切似乎都在主机上运行但是:

  • 当我添加第一个“TodoList对象”来查看它时我必须刷新,但是当我添加时,所有新的“TodoItem对象”都显示得很好,没有刷新(这就是点^^)

  • 如果我在管理面板中添加它,我看不到另一个“TodoList对象”。即使我刷新。

  • 当我删除所有“TodoList对象”并刷新页面时,我从“./manage.py runsd”在控制台中收到一个奇怪的错误。当我在删除后创建一个新的“TodoList对象”时添加新的“TodoList对象”相同:

-------- SwampDragon ------
Running SwampDragon on 127.0.0.1:9999
DRAGON_URL: http://localhost:9999/
Version 0.4.2.2
Debug: True
Quit the server with ctrl+c
---------------------------
ERROR:tornado.general:WebSocket
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/sockjs/tornado/transports/websocket.py", line 60, in on_message
    self.session.on_messages(msg)
  File "/usr/local/lib/python2.7/dist-packages/sockjs/tornado/session.py", line 418, in on_messages
    self.conn.on_message(msg)
  File "/usr/local/lib/python2.7/dist-packages/swampdragon/connections/sockjs_connection.py", line 90, in on_message
    raise e
DoesNotExist: TodoList matching query does not exist.

Django版本:1.8.6

Python:2.7

刚刚用pip安装的Swampdragon

您知道这是怎么回事以及如何纠正吗?

非常感谢。

0 个答案:

没有答案