Search code examples
python-3.xodoo-11

SyntaxError: invalid syntax, when starting odoo-bin Odoo 11


Upadate:

At the moment Odoo-11.0 is not compatible with Python 3.7.0

I did a source install with odoo version 11.0 on Windows 10. Executing odoo-bin results in a syntax error. Previously it was running fine with Python 3.6.3 but with installation of Python 3.7.0. It stops working.

I've found post with similar issue. it didn't help me out. 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

All pip dependencies are installed. They are following.

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    

Solution

  • I've reinstall 'Python 3.6.6' and everything is working just fine.

    At the moment 'Odoo-11.0' is not compatible with 'Python 3.7.0'