from sql import Cast, Literal, Values, With ?

27 views
Skip to first unread message

Lucas Riccombene

unread,
May 4, 2016, 4:35:03 PM5/4/16
to tryton-dev
tryton 3.4 porque en 3.8 directamente no funciona


Error al registrar el modulo Farm.
Failed to register the Farm module.

Encontre esta linea
I found this line

from sql import Cast, Literal, Values, With
from sql.aggregate import Avg, Count, Max, Sum
from sql.conditionals import Coalesce
from sql.functions import Extract, Now

¿de donde saco la librería que contiene esta clase ?
Where do I get the library containing this class?

sql
Server 3.4

[Wed May 04 19:42:50 2016] INFO:modules:farm:registering classes
Traceback (most recent call last):
  File "/usr/local/bin/trytond", line 80, in <module>
    trytond.server.TrytonServer(options).run()
  File "/usr/local/lib/python2.7/dist-packages/trytond/server.py", line 98, in run
    Pool(db_name).init(update=self.options.update, lang=lang)
  File "/usr/local/lib/python2.7/dist-packages/trytond/pool.py", line 140, in init
    self.start()
  File "/usr/local/lib/python2.7/dist-packages/trytond/pool.py", line 92, in start
    register_classes()
  File "/usr/local/lib/python2.7/dist-packages/trytond/modules/__init__.py", line 351, in register_classes
    mod_file, pathname, description)
  File "/usr/local/lib/python2.7/dist-packages/trytond/modules/farm/__init__.py", line 7, in <module>
    from .events import *
  File "/usr/local/lib/python2.7/dist-packages/trytond/modules/farm/events/__init__.py", line 7, in <module>
    from .feed_inventory import *
  File "/usr/local/lib/python2.7/dist-packages/trytond/modules/farm/events/feed_inventory.py", line 6, in <module>
    from sql import Cast, Literal, Values, With
ImportError: cannot import name Values

Cédric Krier

unread,
May 6, 2016, 5:10:03 AM5/6/16
to tryton-dev
On 2016-05-04 12:52, Lucas Riccombene wrote:
> from sql import Cast, Literal, Values, With
> ImportError: cannot import name Values

Values was added in python-sql 0.5 so if you want to use it, you must
update to at least this version (better to use the latest as it is
backward compatible).

--
Cédric Krier - B2CK SPRL
Email/Jabber: cedric...@b2ck.com
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/
Reply all
Reply to author
Forward
0 new messages