Error starting trytond

147 views
Skip to first unread message

Marko Randjelovic

unread,
Jul 27, 2016, 6:00:07 PM7/27/16
to tryton
When starting trytond ver 4.1.0, I get this error:

(trytond) mr@abc24:~/training/trytond4$ bin/trytond -c ../trytond4p.conf -d test
Traceback (most recent call last):
  File "bin/trytond", line 24, in <module>
    from trytond.application import app
  File "/home/mr/training/trytond4/trytond/application.py", line 8, in <module>
    Pool.start()
  File "/home/mr/training/trytond4/trytond/pool.py", line 97, in start
    register_classes()
  File "/home/mr/training/trytond4/trytond/modules/__init__.py", line 362, in register_classes
    mod_file, pathname, description)
  File "/home/mr/training/trytond4/trytond/modules/account/__init__.py", line 6, in <module>
    from .account import *
  File "/home/mr/training/trytond4/trytond/modules/account/account.py", line 8, in <module>
    from sql import Column, Null, Window, Literal
ImportError: cannot import name Window

Contents of trytond4p.conf:

[database]
uri = postgresql://tryton:xxxxxxxx@localhost:5432/

[session]
super_pwd = xxxxxxxxxxxxx

I created tryton user with this command:

createuser --createdb --username postgres --no-createrole --pwprompt tryton

Regards,
Marko

Cédric Krier

unread,
Jul 27, 2016, 7:25:03 PM7/27/16
to tryton
On 2016-07-27 12:50, Marko Randjelovic wrote:
> File "/home/mr/training/trytond4/trytond/modules/account/account.py",
> line 8, in <module>
> from sql import Column, Null, Window, Literal
> ImportError: cannot import name Window

account module requires python-sql >= 0.7, see the setup.py

--
Cédric Krier - B2CK SPRL
Email/Jabber: cedric...@b2ck.com
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/

Sergi Almacellas Abellana

unread,
Jul 28, 2016, 3:20:21 AM7/28/16
to try...@googlegroups.com
El 27/07/16 a les 21:50, Marko Randjelovic ha escrit:
> When starting trytond ver 4.1.0, I get this error:
>
> (trytond) mr@abc24:~/training/trytond4$ bin/trytond -c ../trytond4p.conf
> -d test
> Traceback (most recent call last):
> File "bin/trytond", line 24, in <module>
> from trytond.application import app
> File "/home/mr/training/trytond4/trytond/application.py", line 8, in
> <module>
> Pool.start()
> File "/home/mr/training/trytond4/trytond/pool.py", line 97, in start
> register_classes()
> File "/home/mr/training/trytond4/trytond/modules/__init__.py", line
> 362, in register_classes
> mod_file, pathname, description)
> File "/home/mr/training/trytond4/trytond/modules/account/__init__.py",
> line 6, in <module>
> from .account import *
> File "/home/mr/training/trytond4/trytond/modules/account/account.py",
> line 8, in <module>
> from sql import Column, Null, Window, Literal
> ImportError: cannot import name Window

account module at least version 0.7 of python-sql [1] and you seem to
have and older version. Please upgrade you python-sql to a more recent
version.

[1] http://hg.tryton.org/modules/account/file/5d2be5235e04/setup.py#l50

--
Sergi Almacellas Abellana
www.koolpi.com
Twitter: @pokoli_srk

Marko Randjelovic

unread,
Jul 28, 2016, 5:05:03 AM7/28/16
to tryton

(trytond) mr@abc24:~/training$ pip install python-sql --upgrade
Collecting python-sql
Installing collected packages: python-sql
  Found existing installation: python-sql 0.4
    Not uninstalling python-sql at /usr/lib/python2.7/dist-packages, outside environment /home/mr/training/.venv/trytond
Successfully installed python-sql-0.4

For some reason pip installs again the same version. In repo available is 0.8.

(trytond) mr@abc24:~/training$ pip search sql | grep "^python-sql"
python-sql-abstraction (0.0.1)                           - SQL Abstraction layer written in Python 3.2 for use in lower level applications, such as tkinter.
python-sql (0.8)                                         - Library to write SQL queries


Mathias Behrle

unread,
Jul 28, 2016, 5:17:57 AM7/28/16
to try...@googlegroups.com
* Marko Randjelovic: " Re: [tryton] Error starting trytond" (Thu, 28 Jul 2016
01:46:31 -0700 (PDT)):
You seem to have python-sql installed via your package manager and eventually
your virtualenv is set up with global-site-packages enabled. What is the OS you
are running?

So either update the first one with a recent version or change your virtualenv
to not use site-packages (in which case pip will install python-sql into the
virtualenv).

Regards,

Mathias

> Successfully installed python-sql-0.4
>
> For some reason pip installs again the same version. In repo available is
> 0.8.
>
> (trytond) mr@abc24:~/training$ pip search sql | grep "^python-sql"
> python-sql-abstraction (0.0.1) - SQL Abstraction
> layer written in Python 3.2 for use in lower level applications, such as
> tkinter.
> python-sql (0.8) - Library to write
> SQL queries
>
>
>
> > [1] http://hg.tryton.org/modules/account/file/5d2be5235e04/setup.py#l50
> > <http://www.google.com/url?q=http%3A%2F%2Fhg.tryton.org%2Fmodules%2Faccount%2Ffile%2F5d2be5235e04%2Fsetup.py%23l50&sa=D&sntz=1&usg=AFQjCNGP6z8lHoJAm3DPcs_AvcMccvQHgA>
> >
> > --
> > Sergi Almacellas Abellana
> > www.koolpi.com
> > Twitter: @pokoli_srk
> >
>



--

Mathias Behrle
MBSolutions
Gilgenmatten 10 A
D-79114 Freiburg

Tel: +49(761)471023
Fax: +49(761)4770816
http://www.m9s.biz
UStIdNr: DE 142009020
PGP/GnuPG key availabable from any keyserver, ID: 0x8405BBF6

Marko Randjelovic

unread,
Jul 28, 2016, 10:05:00 AM7/28/16
to tryton

I use Debian Jessie and indeed there was python-sql in global environment. After reading your message, I uninstalled it (using Debian package manager), but pip (in virtual environment) still didn't want to upgrade python-sql (said already at newest version which was obviously wrong). Than I uninstalled it and after the command to install it, pip installed 0.8. Then Tryton server started without an error.
 
Reply all
Reply to author
Forward
0 new messages