Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
2328 Widoki

Hi,

I'm getting an error when trying to collect order data through the API:

Traceback (most recent call last): File "F:\Odoo\python\lib\xmlrpc\client.py", line 522, in __dump f = self.dispatch[type(value)] KeyError:During handling of the above exception, another exception occurred: Traceback (most recent call last): File "F:\Odoo\server\odoo\addons\base\controllers\rpc.py", line 148, in xmlrpc_2 response = self._xmlrpc(service) File "F:\Odoo\server\odoo\addons\base\controllers\rpc.py", line 129, in _xmlrpc return xmlrpc.client.dumps((result,), methodresponse=1, allow_none=False) File "F:\Odoo\python\lib\xmlrpc\client.py", line 981, in dumps data = m.dumps(params) File "F:\Odoo\python\lib\xmlrpc\client.py", line 514, in dumps dump(v, write) File "F:\Odoo\python\lib\xmlrpc\client.py", line 536, in __dump f(self, value, write) File "F:\Odoo\python\lib\xmlrpc\client.py", line 589, in dump_array dump(v, write) File "F:\Odoo\python\lib\xmlrpc\client.py", line 536, in __dump f(self, value, write) File "F:\Odoo\python\lib\xmlrpc\client.py", line 607, in dump_struct dump(v, write) File "F:\Odoo\python\lib\xmlrpc\client.py", line 536, in __dump f(self, value, write) File "F:\Odoo\python\lib\xmlrpc\client.py", line 607, in dump_struct dump(v, write) File "F:\Odoo\python\lib\xmlrpc\client.py", line 526, in __dump raise TypeError("cannot marshal %s objects" % type(value)) TypeError: cannot marshal objects

Has anyone an idea how to solve this?

Awatar
Odrzuć
Autor

Thank you, looks like this is working. But i now have a new problem when trying to fetch the clients:

Traceback (most recent call last): File "F:\Odoo\server\odoo\addons\base\controllers\rpc.py", line 150, in xmlrpc_2 response = self._xmlrpc(service) File "F:\Odoo\server\odoo\addons\base\controllers\rpc.py", line 130, in _xmlrpc result = dispatch_rpc(service, method, params) File "F:\Odoo\server\odoo\http.py", line 366, in dispatch_rpc return dispatch(method, params) File "F:\Odoo\server\odoo\service\model.py", line 35, in dispatch res = execute(db, uid, *params[3:]) File "F:\Odoo\server\odoo\service\model.py", line 65, in execute res = execute_cr(cr, uid, obj, method, *args, **kw) File "F:\Odoo\server\odoo\service\model.py", line 50, in execute_cr result = retrying(partial(odoo.api.call_kw, recs, method, args, kw), env) File "F:\Odoo\server\odoo\service\model.py", line 133, in retrying result = func() File "F:\Odoo\server\odoo\api.py", line 457, in call_kw result = _call_kw_model(method, model, args, kwargs) File "F:\Odoo\server\odoo\api.py", line 430, in _call_kw_model result = method(recs, *args, **kwargs) File "F:\Odoo\server\odoo\models.py", line 1512, in search res = self._search(domain, offset=offset, limit=limit, order=order, count=count) File "F:\Odoo\server\odoo\addons\base\models\res_partner.py", line 911, in _search return super(Partner, self)._search(args, offset=offset, limit=limit, order=order, File "F:\Odoo\server\odoo\models.py", line 4655, in _search if expression.is_false(self, domain): File "F:\Odoo\server\odoo\osv\expression.py", line 226, in is_false elif token[1] == 'in' and not (isinstance(token[2], Query) or token[2]): IndexError: string index out of range

Najlepsza odpowiedź

Hi,
If you are using odoo 16 and getting this error message, then you are using not updated code base. The issue has been already fixed in the core.

* update source code to latest
* restart the service
* try the same

Thanks

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
3
kwi 19
3291
1
sie 25
1534
5
maj 25
33897
2
wrz 23
2817
1
mar 23
2272