Re: [tryton] Many2One create error in a upgraded database
El domingo, 21 de febrero de 2016, 18:22:04 (UTC), raimonesteve escribió: > > > El dia 21/02/2016 18.01, "Antonio Roncero"> va escriure: > > > > Hi, I asked it in irc channel without answer > > > > I have two databases in the same server with the same code. One of them > is new and the other is a upgraded from a previous version. > > it his line: > > > > talks = super(HelpdeskTalk, cls).create(vlist) > > > > vlist is identical value in both versions but in the upgraded one, fails. > > > > With the debug i fount the exception occurs in > "trytond/protocols/dispatcher.py:162" > > > > result = rpc.result(meth(*c_args, **c_kwargs)) > > > > *c_args -> [[Pool().get('helpdesk')(6)], {'talks': [['create', > [{'message': 'fsadfasdf', 'email': u''}]]]}] > > when it works and > > *c_args -> [[Pool().get('helpdesk')(202)], {'talks': [['create', > [{'message': 'asdfasdfasdf', 'email': u''}]]]}] > > > > and **c_kwargs = {} in both cases when fails > > > > any ideas? > > > > This is the error > > > > 32660 139734480164608 [2016-02-21 16:26:00,585] ERROR > trytond.protocols.dispatcher model.helpdesk.write(*([192], {'talks': > [['create', [{'message': 'AAA', 'email': u''}]]]}, {'date_format': > '%d/%m/%Y', 'language': 'es_ES', 'locale': {'date': '%d/%m/%Y', > 'thousands_sep': '.', 'decimal_point': ',', 'grouping': [3, 3, 0]}, > 'language_direction': 'ltr', '_check_access': True, 'company_work_time': > {'M': 576000.0, 'd': 28800.0, 'h': 3600, 'm': 60, 's': 1, 'w': 144000.0, > 'Y': 6912000.0}, 'company.rec_name': 'Onneo Business Solutions, S.L.', > 'groups': [1, 37, 25, 14, 21, 10, 5, 29, 31, 34, 7, 2, 23, 6, 24, 3, 13, > 36, 32, 26, 11, 4, 30, 18, 35, 19, 9, 27, 20, 8, 22, 17, 28, 33, 12], > 'employee': None, 'company': 1}), **{}) from 1@::1:59055/onneo_38 > > Traceback (most recent call last): > > File "/opt/tryton/instances/onneo_38/trytond/protocols/dispatcher.py", > line 162, in dispatch > > result = rpc.result(meth(*c_args, **c_kwargs)) > > File "/opt/tryton/instances/onneo_38/trytond/model/modelsql.py", line > 928, in write > > field.set(cls, fname, *fargs) > > File > "/opt/tryton/instances/onneo_38/trytond/model/fields/one2many.py", line > 203, in set > > Target.create(to_create) > > File > "/opt/tryton/instances/onneo_38/trytond/modules/helpdesk/helpdesk.py", line > 709, in create > > talks = super(HelpdeskTalk, cls).create(vlist) > > File "/opt/tryton/instances/onneo_38/trytond/model/modelsql.py", line > 586, in create > > cls.trigger_create(records) > > File "/opt/tryton/instances/onneo_38/trytond/model/modelstorage.py", > line 114, in trigger_create > > if Trigger.eval(trigger, record): > > File "/opt/tryton/instances/onneo_38/trytond/ir/trigger.py", line 179, > in eval > > return bool(PYSONDecoder(env).decode(trigger.condition)) > > File "/usr/lib/python2.7/dist-packages/simplejson/decoder.py", line > 370, in decode > > obj, end = self.raw_decode(s) > > File "/usr/lib/python2.7/dist-packages/simplejson/decoder.py", line > 400, in raw_decode > > return self.scan_once(s, idx=_w(s, idx).end()) > > JSONDecodeError: Expecting value: line 1 column 1 (char 0) > > I think the problem is expresion trigger (see administrator/triggers). > Since 3.6 (or 3.8?) changed syntax expresion trigger. > Thanks Raimon, it was that... -- You received this message because you are subscribed to the Google Groups "tryton" group. To view this discussion on the web visit https://groups.google.com/d/msgid/tryton/23b33125-df7d-4c77-b1d3-f15c2a2fa4e0%40googlegroups.com.
Re: [tryton] Many2One create error in a upgraded database
El dia 21/02/2016 18.01, "Antonio Roncero"va escriure: > > Hi, I asked it in irc channel without answer > > I have two databases in the same server with the same code. One of them is new and the other is a upgraded from a previous version. > it his line: > > talks = super(HelpdeskTalk, cls).create(vlist) > > vlist is identical value in both versions but in the upgraded one, fails. > > With the debug i fount the exception occurs in "trytond/protocols/dispatcher.py:162" > > result = rpc.result(meth(*c_args, **c_kwargs)) > > *c_args -> [[Pool().get('helpdesk')(6)], {'talks': [['create', [{'message': 'fsadfasdf', 'email': u''}]]]}] > when it works and > *c_args -> [[Pool().get('helpdesk')(202)], {'talks': [['create', [{'message': 'asdfasdfasdf', 'email': u''}]]]}] > > and **c_kwargs = {} in both cases when fails > > any ideas? > > This is the error > > 32660 139734480164608 [2016-02-21 16:26:00,585] ERROR trytond.protocols.dispatcher model.helpdesk.write(*([192], {'talks': [['create', [{'message': 'AAA', 'email': u''}]]]}, {'date_format': '%d/%m/%Y', 'language': 'es_ES', 'locale': {'date': '%d/%m/%Y', 'thousands_sep': '.', 'decimal_point': ',', 'grouping': [3, 3, 0]}, 'language_direction': 'ltr', '_check_access': True, 'company_work_time': {'M': 576000.0, 'd': 28800.0, 'h': 3600, 'm': 60, 's': 1, 'w': 144000.0, 'Y': 6912000.0}, 'company.rec_name': 'Onneo Business Solutions, S.L.', 'groups': [1, 37, 25, 14, 21, 10, 5, 29, 31, 34, 7, 2, 23, 6, 24, 3, 13, 36, 32, 26, 11, 4, 30, 18, 35, 19, 9, 27, 20, 8, 22, 17, 28, 33, 12], 'employee': None, 'company': 1}), **{}) from 1@::1:59055/onneo_38 > Traceback (most recent call last): > File "/opt/tryton/instances/onneo_38/trytond/protocols/dispatcher.py", line 162, in dispatch > result = rpc.result(meth(*c_args, **c_kwargs)) > File "/opt/tryton/instances/onneo_38/trytond/model/modelsql.py", line 928, in write > field.set(cls, fname, *fargs) > File "/opt/tryton/instances/onneo_38/trytond/model/fields/one2many.py", line 203, in set > Target.create(to_create) > File "/opt/tryton/instances/onneo_38/trytond/modules/helpdesk/helpdesk.py", line 709, in create > talks = super(HelpdeskTalk, cls).create(vlist) > File "/opt/tryton/instances/onneo_38/trytond/model/modelsql.py", line 586, in create > cls.trigger_create(records) > File "/opt/tryton/instances/onneo_38/trytond/model/modelstorage.py", line 114, in trigger_create > if Trigger.eval(trigger, record): > File "/opt/tryton/instances/onneo_38/trytond/ir/trigger.py", line 179, in eval > return bool(PYSONDecoder(env).decode(trigger.condition)) > File "/usr/lib/python2.7/dist-packages/simplejson/decoder.py", line 370, in decode > obj, end = self.raw_decode(s) > File "/usr/lib/python2.7/dist-packages/simplejson/decoder.py", line 400, in raw_decode > return self.scan_once(s, idx=_w(s, idx).end()) > JSONDecodeError: Expecting value: line 1 column 1 (char 0) I think the problem is expresion trigger (see administrator/triggers). Since 3.6 (or 3.8?) changed syntax expresion trigger. -- You received this message because you are subscribed to the Google Groups "tryton" group. To view this discussion on the web visit https://groups.google.com/d/msgid/tryton/CAN2HbXUBO1DXrTx5KRTKmKNrMZ3bFpjp%2B%2BPWw9SU8JwWgSu%3D7w%40mail.gmail.com.
[tryton] Many2One create error in a upgraded database
Hi, I asked it in irc channel without answer I have two databases in the same server with the same code. One of them is new and the other is a upgraded from a previous version. it his line: talks = super(HelpdeskTalk, cls).create(vlist) vlist is identical value in both versions but in the upgraded one, fails. With the debug i fount the exception occurs in "trytond/protocols/dispatcher.py:162" result = rpc.result(meth(*c_args, **c_kwargs)) *c_args -> [[Pool().get('helpdesk')(6)], {'talks': [['create', [{'message': 'fsadfasdf', 'email': u''}]]]}] when it works and *c_args -> [[Pool().get('helpdesk')(202)], {'talks': [['create', [{'message': 'asdfasdfasdf', 'email': u''}]]]}] and **c_kwargs = {} in both cases when fails any ideas? This is the error 32660 139734480164608 [2016-02-21 16:26:00,585] ERROR trytond.protocols.dispatcher model.helpdesk.write(*([192], {'talks': [['create', [{'message': 'AAA', 'email': u''}]]]}, {'date_format': '%d/%m/%Y', 'language': 'es_ES', 'locale': {'date': '%d/%m/%Y', 'thousands_sep': '.', 'decimal_point': ',', 'grouping': [3, 3, 0]}, 'language_direction': 'ltr', '_check_access': True, 'company_work_time': {'M': 576000.0, 'd': 28800.0, 'h': 3600, 'm': 60, 's': 1, 'w': 144000.0, 'Y': 6912000.0}, 'company.rec_name': 'Onneo Business Solutions, S.L.', 'groups': [1, 37, 25, 14, 21, 10, 5, 29, 31, 34, 7, 2, 23, 6, 24, 3, 13, 36, 32, 26, 11, 4, 30, 18, 35, 19, 9, 27, 20, 8, 22, 17, 28, 33, 12], 'employee': None, 'company': 1}), **{}) from 1@::1:59055/onneo_38 Traceback (most recent call last): File "/opt/tryton/instances/onneo_38/trytond/protocols/dispatcher.py", line 162, in dispatch result = rpc.result(meth(*c_args, **c_kwargs)) File "/opt/tryton/instances/onneo_38/trytond/model/modelsql.py", line 928, in write field.set(cls, fname, *fargs) File "/opt/tryton/instances/onneo_38/trytond/model/fields/one2many.py", line 203, in set Target.create(to_create) File "/opt/tryton/instances/onneo_38/trytond/modules/helpdesk/helpdesk.py", line 709, in create talks = super(HelpdeskTalk, cls).create(vlist) File "/opt/tryton/instances/onneo_38/trytond/model/modelsql.py", line 586, in create cls.trigger_create(records) File "/opt/tryton/instances/onneo_38/trytond/model/modelstorage.py", line 114, in trigger_create if Trigger.eval(trigger, record): File "/opt/tryton/instances/onneo_38/trytond/ir/trigger.py", line 179, in eval return bool(PYSONDecoder(env).decode(trigger.condition)) File "/usr/lib/python2.7/dist-packages/simplejson/decoder.py", line 370, in decode obj, end = self.raw_decode(s) File "/usr/lib/python2.7/dist-packages/simplejson/decoder.py", line 400, in raw_decode return self.scan_once(s, idx=_w(s, idx).end()) JSONDecodeError: Expecting value: line 1 column 1 (char 0) -- You received this message because you are subscribed to the Google Groups "tryton" group. To view this discussion on the web visit https://groups.google.com/d/msgid/tryton/d0d508c7-e27e-4619-8106-721c2cb938e3%40googlegroups.com.