Search code examples
sslssl-certificateodooxml-rpcerp

Odoo xmlrpc certification has expired


I wrote this script around 4 months ago, everything was working fine. But when I returned to this code yesterday I got the following exception:

ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1108)

this happens when I run the following:

client = xmlrpc.client.ServerProxy('{}/xmlrpc/2/common'.format(odoo_server), allow_none=True)

what might be the problem?


Solution

  • This solution might help you out in your situation.

    import ssl
    xmlrpc.client.ServerProxy('{}/xmlrpc/2/common'.format(odoo_server), allow_none=True,verbose=False, use_datetime=True,context=ssl._create_unverified_context())