启动 Odoo 抛错 TypeError: __call__() takes exactly 2 arguments (1 given)

$ /bin/python /home/openerp/odoo/openerp-server -c /etc/odoo-server.conf
Traceback (most recent call last):
File “/home/openerp/odoo/openerp-server”, line 2, in <module>
import openerp
File “/odoo/odoo/openerp/__init__.py”, line 81, in <module>
import report
File “/odoo/odoo/openerp/report/__init__.py”, line 24, in <module>
import interface
File “/odoo/odoo/openerp/report/interface.py”, line 31, in <module>
import render
File “/odoo/odoo/openerp/report/render/__init__.py”, line 23, in <module>
from rml import rml, rml2html, rml2txt, odt2odt , html2html, makohtml2html
File “/odoo/odoo/openerp/report/render/rml.py”, line 28, in <module>
import makohtml2html as makohtml
File “/odoo/odoo/openerp/report/render/makohtml2html/__init__.py”, line 22, in <module>
from makohtml2html import parseNode
File “/odoo/odoo/openerp/report/render/makohtml2html/makohtml2html.py”, line 24, in <module>
from mako.template import Template
File “/usr/lib64/python2.7/site-packages/mako/template.py”, line 10, in <module>
from mako.lexer import Lexer
File “/usr/lib64/python2.7/site-packages/mako/lexer.py”, line 11, in <module>
from mako import parsetree, exceptions, compat
File “/usr/lib64/python2.7/site-packages/mako/parsetree.py”, line 9, in <module>
from mako import exceptions, ast, util, filters, compat
File “/usr/lib64/python2.7/site-packages/mako/exceptions.py”, line 273, in <module>
_install_highlighting()
File “/usr/lib64/python2.7/site-packages/mako/exceptions.py”, line 270, in _install_highlighting
_install_pygments()
File “/usr/lib64/python2.7/site-packages/mako/exceptions.py”, line 255, in _install_pygments
from mako.ext.pygmentplugin import syntax_highlight # noqa
File “/usr/lib64/python2.7/site-packages/mako/ext/pygmentplugin.py”, line 7, in <module>
from pygments.lexers.web import \
File “/usr/lib/python2.7/site-packages/pygments/lexers/__init__.py”, line 18, in <module>
from pygments.plugin import find_plugin_lexers
File “/usr/lib/python2.7/site-packages/pygments/plugin.py”, line 39, in <module>
import pkg_resources
File “/usr/lib/python2.7/site-packages/pkg_resources/__init__.py”, line 72, in <module>
import packaging.requirements
File “/usr/lib/python2.7/site-packages/packaging/requirements.py”, line 59, in <module>
MARKER_EXPR = originalTextFor(MARKER_EXPR())(“marker”)
TypeError: __call__() takes exactly 2 arguments (1 given)

解决办法,降 setuptools 版本

# pip install setuptools==33.1.1
Collecting setuptools==33.1.1
Downloading setuptools-33.1.1-py2.py3-none-any.whl (472kB)
100% |████████████████████████████████| 481kB 852kB/s
Installing collected packages: setuptools
Found existing installation: setuptools 35.0.2
Uninstalling setuptools-35.0.2:
Successfully uninstalled setuptools-35.0.2
Successfully installed setuptools-33.1.1

作者: 甬洁网络

--移动互联网&物联网技术提供商