Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RPCError ASCII #53

Open
fanchlegal opened this issue Nov 3, 2021 · 0 comments
Open

RPCError ASCII #53

fanchlegal opened this issue Nov 3, 2021 · 0 comments

Comments

@fanchlegal
Copy link

Hello,

When i try to get some partners from a french database with the code :

connection = odoorpc.ODOO(serveur, port=port,protocol=protocol)
connection.login(base,identifiant,motdepasse)
                  
obj = connection.env['res.partner']
datas = obj.search([])
for data in obj.browse(datas):
   _logger.info(data)

I have this error :

for data in obj.browse(datas):
File "/usr/local/lib/python3.8/site-packages/odoorpc/models.py", line 267, in browse
return cls._browse(cls.env, ids)
File "/usr/local/lib/python3.8/site-packages/odoorpc/models.py", line 233, in _browse
records._init_values()
File "/usr/local/lib/python3.8/site-packages/odoorpc/models.py", line 347, in _init_values
rows = self.class.read(
File "/usr/local/lib/python3.8/site-packages/odoorpc/models.py", line 59, in rpc_method
result = cls._odoo.execute_kw(cls._name, method, args, kwargs)
File "/usr/local/lib/python3.8/site-packages/odoorpc/odoo.py", line 482, in execute_kw
data = self.json(
File "/usr/local/lib/python3.8/site-packages/odoorpc/odoo.py", line 273, in json
raise error.RPCError(
Exception

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/home/odoo/src/odoo/odoo/http.py", line 640, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/home/odoo/src/odoo/odoo/http.py", line 316, in _handle_exception
raise exception.with_traceback(None) from new_cause
odoorpc.error.RPCError: ascii

I have indeed some non ascii characters on the partner : é

What can i do ?

Thank you very much :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant