Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

1

service openerp start but SyntaxError: invalid syntax

By
tderp
on 5/16/14, 4:13 AM 1,697 views

    from openerp.osv.orm import except_orm, Model, TransientModel, AbstractModel
  File "/usr/lib/python2.6/site-packages/openerp-8.0dev_20140416_230101-py2.6.egg/openerp/osv/orm.py", line 2404
    groupby_dict = {gb['groupby']: gb for gb in annotated_groupbys}
                                        ^
SyntaxError: invalid syntax

 

0

Hi,

the dict comprehension doesn't work on python 2.6, then you have to install python 2.7 and use it.

0
tderp
On 5/20/14, 9:01 PM

Dict comprehensions were added to the language in version 2.7.

So you need to upgrade to Python 2.7. If you're stuck with 2.6, you could use

groupby_dict = dict((gb['groupby'], gb) for gb in annotated_groupbys)

this is  answer ?

Thanks .

 

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 5/16/14, 4:13 AM
Seen: 1697 times
Last updated: 3/16/15, 8:10 AM