odoorpc.error¶
This module contains all exceptions raised by OdooRPC when an error occurred.
-
exception
odoorpc.error.
Error
¶ Base class for exception.
-
exception
odoorpc.error.
InternalError
¶ Exception raised for errors occurring during an internal operation.
-
exception
odoorpc.error.
RPCError
(message, info=False)¶ Exception raised for errors related to RPC queries. Error details (like the Odoo server traceback) are available through the info attribute:
>>> from pprint import pprint as pp >>> try: ... odoo.execute('res.users', 'wrong_method') ... except odoorpc.error.RPCError as exc: ... pp(exc.info) ... {'code': 200, 'data': {'arguments': ["type object 'res.users' has no attribute 'wrong_method'"], 'debug': 'Traceback (most recent call last):\n File ...', 'exception_type': 'internal_error', 'message': "'res.users' object has no attribute 'wrong_method'", 'name': 'exceptions.AttributeError'} 'message': 'Odoo Server Error'}