代码之家  ›  专栏  ›  技术社区  ›  Kasim Rangwala

语法错误:无效语法,当启动odoo bin odoo 11时

  •  1
  • Kasim Rangwala  · 技术社区  · 6 年前

    更新日期:

    目前 Odoo-11.0 与不兼容 Python 3.7.0

    我在Windows10上用odoo 11.0版安装了一个源代码。执行odoo bin会导致语法错误。以前它运行良好 Python 3.6.3 但是安装了 python 3.7.0版 . 它停止工作。

    我找到了 post 有类似的问题。这对我没有帮助。 https://www.odoo.com/forum/help-1/question/syntaxerror-when-starting-odoo-bin-for-the-first-time-135925

    PS C:\Users\Kasim Rangwala> python3 D:/Python/Odoo/odoo-11.0/odoo-bin -w odoo -r odoo --addons-path=D:/Python/Odoo/odoo-11.0/addons --log-level=debug_rpc
    2018-07-17 09:34:47,234 3516 DEBUG ? odoo.netsvc: logger level set: "odoo.http.rpc.request:INFO"
    2018-07-17 09:34:47,234 3516 DEBUG ? odoo.netsvc: logger level set: "odoo.http.rpc.response:INFO"
    2018-07-17 09:34:47,234 3516 DEBUG ? odoo.netsvc: logger level set: ":INFO"
    2018-07-17 09:34:47,234 3516 DEBUG ? odoo.netsvc: logger level set: "odoo:DEBUG"
    2018-07-17 09:34:47,234 3516 DEBUG ? odoo.netsvc: logger level set: "odoo.sql_db:INFO"
    2018-07-17 09:34:47,234 3516 DEBUG ? odoo.netsvc: logger level set: "odoo.http.rpc.request:DEBUG"
    2018-07-17 09:34:47,234 3516 DEBUG ? odoo.netsvc: logger level set: ":INFO"
    2018-07-17 09:34:47,234 3516 INFO ? odoo: Odoo version 11.0
    2018-07-17 09:34:47,234 3516 INFO ? odoo: addons paths: ['C:\\Users\\Kasim Rangwala\\AppData\\Local\\OpenERP S.A.\\Odoo\\addons\\11.0', 'D:\\Python\\Odoo\\odoo-11.0\\addons', 'D:\\Python\\Odoo\\odoo-11.0\\odoo\\addons']
    2018-07-17 09:34:47,234 3516 INFO ? odoo: database: odoo@default:default
    2018-07-17 09:34:47,234 3516 DEBUG ? odoo.service.server: Setting signal handlers
    2018-07-17 09:34:47,234 3516 DEBUG ? odoo.service.server: cron0 started!
    2018-07-17 09:34:47,234 3516 DEBUG ? odoo.service.server: cron1 started!
    2018-07-17 09:34:47,250 3516 INFO ? odoo.service.server: HTTP service (werkzeug) running on DESKTOP-C1RR84D:8069
    2018-07-17 09:34:47,406 3516 INFO ? odoo.addons.base.ir.ir_actions_report: Will use the Wkhtmltopdf binary at C:\Program Files\wkhtmltopdf\bin\wkhtmltopdf.exe
    Exception in thread odoo.service.cron.cron0:
    Traceback (most recent call last):
      File "C:\Users\Kasim Rangwala\AppData\Local\Programs\Python\Python37\lib\threading.py", line 917, in _bootstrap_inner
        self.run()
      File "C:\Users\Kasim Rangwala\AppData\Local\Programs\Python\Python37\lib\threading.py", line 865, in run
        self._target(*self._args, **self._kwargs)
      File "D:\Python\Odoo\odoo-11.0\odoo\service\server.py", line 242, in target
        self.cron_thread(i)
      File "D:\Python\Odoo\odoo-11.0\odoo\service\server.py", line 216, in cron_thread
        from odoo.addons.base.ir.ir_cron import ir_cron
      File "<frozen importlib._bootstrap>", line 983, in _find_and_load
      File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
      File "<frozen importlib._bootstrap>", line 668, in _load_unlocked
      File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible
      File "D:\Python\Odoo\odoo-11.0\odoo\modules\module.py", line 82, in load_module
        exec(open(modfile, 'rb').read(), new_mod.__dict__)
      File "<string>", line 4, in <module>
      File "D:\Python\Odoo\odoo-11.0\odoo\addons\base\ir\__init__.py", line 21, in <module>
        from . import ir_qweb
      File "D:\Python\Odoo\odoo-11.0\odoo\addons\base\ir\ir_qweb\__init__.py", line 5, in <module>
        from . import assetsbundle
      File "D:\Python\Odoo\odoo-11.0\odoo\addons\base\ir\ir_qweb\assetsbundle.py", line 105
        def to_html(self, sep=None, css=True, js=True, debug=False, async=False, url_for=(lambda url: url)):
                                                                        ^
    SyntaxError: invalid syntax
    

    所有 pip 已安装依赖项。他们在跟踪。

    Package         Version  
    --------------- ---------
    Babel           2.6.0    
    beautifulsoup4  4.6.0    
    certifi         2018.4.16
    cffi            1.11.5   
    chardet         3.0.4    
    colorama        0.3.9    
    decorator       4.3.0    
    docutils        0.14     
    ebaysdk         2.1.5    
    feedparser      5.2.1    
    gevent          1.3.5    
    greenlet        0.4.13   
    html2text       2018.1.9 
    idna            2.7      
    Jinja2          2.10     
    lxml            4.2.3    
    Mako            1.0.7    
    MarkupSafe      1.0      
    mock            2.0.0    
    num2words       0.5.7    
    ofxparse        0.17     
    passlib         1.7.1    
    pbr             4.1.0    
    Pillow          5.2.0    
    pip             10.0.1   
    psutil          5.4.6    
    psycogreen      1.0      
    psycopg2        2.7.5    
    pycparser       2.18     
    pydot           1.2.4    
    pyldap          2.4.45   
    pyparsing       2.2.0    
    PyPDF2          1.26.0   
    pypiwin32       223      
    pyserial        3.4      
    python-dateutil 2.7.3    
    python-openid   2.2.5    
    python-stdnum   1.9      
    pytz            2018.5   
    pyusb           1.0.2    
    pywin32         223      
    PyYAML          3.13     
    qrcode          6.0      
    reportlab       3.5.0    
    requests        2.19.1   
    setuptools      39.0.1   
    six             1.11.0   
    suds-jurko      0.6      
    urllib3         1.23     
    vatnumber       1.2      
    vobject         0.9.6    
    Werkzeug        0.14.1   
    xlrd            1.1.0    
    XlsxWriter      1.0.5    
    xlwt            1.3.0    
    
    2 回复  |  直到 5 年前
        1
  •  1
  •   Martin Trigaux    6 年前

    这是一个bug,但已经修复了。

    https://github.com/odoo/odoo/pull/25783

    请毫不犹豫地(在Github上)向我们报告您可能发现的其他问题。

        2
  •  1
  •   sagar sakaria Kasim Rangwala    5 年前

    我已经重新安装了“python 3.6.6”,一切正常。

    目前,“odoo-11.0”与“python 3.7.0”不兼容