使用ImportError失败的工作设置:没有名为conf 的模块
我在localhost上停止了测试设置,用^ c来检查日志
重启时我收到错误
C:\Odoo 10.0\server>odoo-bin -d todo -i todo_app --test-enable --dev=all
Traceback (most recent call last):
File "odoo-bin", line 2, in <module>
File "pkg_resources\__init__.pyc", line 2203, in declare_namespace
File "pkg_resources\__init__.pyc", line 2219, in declare_namespace
File "pkg_resources\__init__.pyc", line 2186, in _handle_ns
File "pkgutil.pyc", line 246, in load_module
argument should be the name of a package, in standard module format
File "C:\Odoo 10.0\server\odoo\__init__.py", line 61, in <module>
import conf
ImportError: No module named conf
TEST - 使用github
中的 init .py创建文件夹confRESULT
C:\Odoo 10.0\server>odoo-bin -d todo -i todo_app --test-enable --dev=all
Traceback (most recent call last):
File "odoo-bin", line 2, in <module>
File "pkg_resources\__init__.pyc", line 2203, in declare_namespace
File "pkg_resources\__init__.pyc", line 2219, in declare_namespace
File "pkg_resources\__init__.pyc", line 2186, in _handle_ns
File "pkgutil.pyc", line 246, in load_module
argument should be the name of a package, in standard module format
File "C:\Odoo 10.0\server\odoo\__init__.py", line 61, in <module>
import conf
File "C:\Odoo 10.0\server\odoo\conf\__init__.py", line 15, in <module>
import deprecation
ImportError: No module named deprecation
结论 - 模块conf发生了一些事情 - 但我不知道我没有做出任何改变 - John
答案 0 :(得分:2)
我认为你正在使用python 3.x. 这个问题发生在linux上,但在使用python 2.7.x后,它正常启动。