Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
1269 Vistas

RPC_ERROR
Odoo Server Error
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/urllib3/connectionpool.py", line 699, in urlopen
httplib_response = self._make_request(
File "/usr/local/lib/python3.8/dist-packages/urllib3/connectionpool.py", line 382, in _make_request
self._validate_conn(conn)
File "/usr/local/lib/python3.8/dist-packages/urllib3/connectionpool.py", line 1010, in _validate_conn
conn.connect()
File "/usr/local/lib/python3.8/dist-packages/urllib3/connection.py", line 411, in connect
self.sock = ssl_wrap_socket(
File "/usr/local/lib/python3.8/dist-packages/urllib3/util/ssl_.py", line 449, in ssl_wrap_socket
ssl_sock = _ssl_wrap_socket_impl(
File "/usr/local/lib/python3.8/dist-packages/urllib3/util/ssl_.py", line 493, in _ssl_wrap_socket_impl
return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
File "/usr/lib/python3.8/ssl.py", line 500, in wrap_socket
return self.sslsocket_class._create(
File "/usr/lib/python3.8/ssl.py", line 1040, in _create
self.do_handshake()
File "/usr/lib/python3.8/ssl.py", line 1309, in do_handshake
self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1131)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/requests/adapters.py", line 439, in send
resp = conn.urlopen(
File "/usr/local/lib/python3.8/dist-packages/urllib3/connectionpool.py", line 755, in urlopen
retries = retries.increment(
File "/usr/local/lib/python3.8/dist-packages/urllib3/util/retry.py", line 574, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='byepicg.com', port=443): Max retries exceeded with url: /wp-json/wc/v3/?consumer_key=ck_20a441d40492ce253c6458d3bcf405ba901a05b2&consumer_secret=cs_6a9e0ac591e548d9aa37ed6de55247217d036890 (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1131)')))

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

Traceback (most recent call last):
File "/odoo/odoo-server/odoo/addons/base/models/ir_http.py", line 237, in _dispatch
result = request.dispatch()
File "/odoo/odoo-server/odoo/http.py", line 687, in dispatch
result = self._call_function(**self.params)
File "/odoo/odoo-server/odoo/http.py", line 359, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/odoo/odoo-server/odoo/service/model.py", line 94, in wrapper
return f(dbname, *args, **kwargs)
File "/odoo/odoo-server/odoo/http.py", line 348, in checked_call
result = self.endpoint(*a, **kw)
File "/odoo/odoo-server/odoo/http.py", line 916, in __call__
return self.method(*args, **kw)
File "/odoo/odoo-server/odoo/http.py", line 535, in response_wrap
response = f(*args, **kw)
File "/odoo/odoo-server/addons/web/controllers/main.py", line 1346, in call_button
action = self._call_kw(model, method, args, kwargs)
File "/odoo/odoo-server/addons/web/controllers/main.py", line 1334, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/odoo/odoo-server/odoo/api.py", line 464, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "/odoo/odoo-server/odoo/api.py", line 451, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "/odoo/custom/addons/eg_woocommerce_integration_lite/models/eg_ecom_instance.py", line 45, in test_connection_of_instance
woo_status = wcapi.get("").status_code
File "/usr/local/lib/python3.8/dist-packages/woocommerce/api.py", line 106, in get
return self.__request("GET", endpoint, None, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/woocommerce/api.py", line 92, in __request
return request(
File "/usr/local/lib/python3.8/dist-packages/requests/api.py", line 61, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/requests/sessions.py", line 542, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.8/dist-packages/requests/sessions.py", line 655, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/requests/adapters.py", line 514, in send
raise SSLError(e, request=request)
Exception

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

Traceback (most recent call last):
File "/odoo/odoo-server/odoo/http.py", line 643, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/odoo/odoo-server/odoo/http.py", line 301, in _handle_exception
raise exception.with_traceback(None) from new_cause
requests.exceptions.SSLError: HTTPSConnectionPool(host='', port=443): Max retries exceeded with url: /wp-json/wc/v3/?consumer_key=XXXXXXXXXXXXXXXXXXXXXXXX&consumer_secret=XXXXXXXXXXXXXXXXXXXXXXXXX (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1131)')))

Avatar
Descartar
Mejor respuesta

It appears that the error you're encountering is related to SSL certificate verification failure when your Odoo server is trying to connect to a WooCommerce API endpoint hosted at byepicg.com.

The error message indicates that the SSL certificate verification failed due to being unable to get the local issuer certificate. This typically happens when the SSL certificate presented by the server cannot be verified against the trusted certificate authorities.

Here are some steps you can take to resolve this issue:

  1. Check SSL Certificate: Ensure that the SSL certificate installed on your WooCommerce server is valid and properly configured.
  2. Update Certificates: Update the SSL certificates bundle on your server. Sometimes, outdated certificate bundles can cause verification failures.
  3. Verify Server URL: Double-check the server URL and make sure it is correct and accessible from your Odoo server.
  4. Check Network Configuration: Verify that your server can connect to the WooCommerce server without any network restrictions or firewalls blocking the connection.
  5. Update Libraries: Make sure that all relevant libraries and dependencies, including requests, urllib3, and ssl, are up-to-date.
  6. Ignore SSL Verification (Not Recommended): As a last resort, you can temporarily ignore SSL certificate verification in your request. However, this is not recommended for production environments as it poses security risks.

Here's an example of how you can ignore SSL verification in your request using the requests library:



Remember to use this method cautiously and only for debugging purposes.

Once you've resolved the SSL certificate verification issue, your Odoo server should be able to connect to the WooCommerce API endpoint without encountering the SSLError.

else you can try a paid plugin - 
https://apps.odoo.com/apps/modules/17.0/odoo_woo_connect/#ept_features

Avatar
Descartar