【发布时间】:2016-02-09 10:59:17
【问题描述】:
我在启动交叉开关 0.12.1 时遇到错误,而我在 0.11 版本中没有该错误
[Controller 210] crossbar.error.invalid_configuration:
WSGI app module 'myproject.wsgi' import failed: No module named django -
Python search path was [u'/myproject', '/opt/crossbar/site-packages/crossbar/worker', '/opt/crossbar/bin', '/opt/crossbar/lib_pypy/extensions', '/opt/crossbar/lib_pypy', '/opt/crossbar/lib-python/2.7', '/opt/crossbar/lib-python/2.7/lib-tk', '/opt/crossbar/lib-python/2.7/plat-linux2', '/opt/crossbar/site-packages']
我没有更改横杆更新的任何其他内容。
我的 config.json 仍然是一样的,我的项目的 pythonpath 在选项中:
{
"workers": [
{
"type": "router",
"options": {
"pythonpath": ["/myproject"]
},
"realms": [
{
"name": "realm1",
"roles": [
{
"name": "anonymous",
"permissions": [
{
"uri": "*",
"publish": true,
"subscribe": true,
"call": true,
"register": true
}
]
}
]
}
],
"transports": [
{
"type": "web",
"endpoint": {
"type": "tcp",
"port": 80
},
"paths": {
"/": {
"type": "wsgi",
"module": "myproject.wsgi",
"object": "application"
},
etc...
你有什么想法吗? 谢谢。
【问题讨论】:
-
>>> 导入 django 作品?
-
是的。在 ./manage.py 外壳中。
-
好的,看我的回答
-
来自 python,没有 manage.py?
-
是的,也来自 python、python2.7 和 ipython。
标签: django docker wamp wsgi crossbar