ERPNext and Shopify connection error

Hello,
I am trying to connect erpnext and shopify by creating a private app in shopify for one of my client. but after adding credentials to shopify settings. I am getting following error. Where as the same credentials work seamlessly with my other server. Here my erpnext and my clients erpnext version are same. yet I get this error.

Traceback (most recent call last):
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/desk/form/save.py”, line 22, in savedocs
doc.save()
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/model/document.py”, line 256, in save
return self._save(*args, **kwargs)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/model/document.py”, line 290, in _save
self.run_before_save_methods()
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/model/document.py”, line 808, in run_before_save_methods
self.run_method(“validate”)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/model/document.py”, line 702, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/model/document.py”, line 965, in composer
return composed(self, method, *args, **kwargs)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/model/document.py”, line 948, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/model/document.py”, line 696, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File “/home/ubuntu/frappe-bench/apps/erpnext_shopify/erpnext_shopify/erpnext_shopify/doctype/shopify_settings/shopify_settings.py”, line 17, in validate
self.validate_access()
File “/home/ubuntu/frappe-bench/apps/erpnext_shopify/erpnext_shopify/erpnext_shopify/doctype/shopify_settings/shopify_settings.py”, line 32, in validate_access
“access_token”: self.access_token, “app_type”: self.app_type})
File “/home/ubuntu/frappe-bench/apps/erpnext_shopify/erpnext_shopify/shopify_requests.py”, line 35, in get_request
r = s.get(url, headers=get_header(settings))
File “/home/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/requests/sessions.py”, line 515, in get
return self.request(‘GET’, url, **kwargs)
File “/home/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/requests/sessions.py”, line 502, in request
resp = self.send(prep, **send_kwargs)
File “/home/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/requests/sessions.py”, line 612, in send
r = adapter.send(request, **kwargs)
File “/home/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/requests/adapters.py”, line 514, in send
raise SSLError(e, request=request)
SSLError: (“bad handshake: Error([(‘SSL routines’, ‘ssl3_get_server_certificate’, ‘certificate verify failed’)],)”,)

Below commands solved my issue. Run below commands from frappe-bench folder.
pip uninstall pyopenssl
pip install pyopenssl
sudo pip install -U pyopenssl

2 Likes

@kolate_sambhaji Okay Thanks for reply. I shall try this solution.

Thanks for this specific solution. I was having trouble on our custom application, when trying to connect to a SOAP /WSDL listener https:// address.

Uninstalling and reinstalling pyopenssl helped.

Please note that if the above commands don’t work outright, try the following:

sudo ./env/bin/pip install pyopenssl
sudo ./env/bin/pip install -U pyopenssl

Then this:

bench restart && bench start

GitHub issue for our app, scroll down for english!
Will aim for a PR to the core in a month or two, for any wsdl /soap service.