Hi all,
I’ve use the Shopify Setting in ERP v11. When I make an order on Shopify, the customer is created, but not the product nor the Sales Order/Sales Invoice.
I added a print log in the Except here: https://github.com/frappe/erpnext/blob/develop/erpnext/erpnext_integrations/doctype/shopify_settings/sync_product.py#L10
Which returns this when I have 2 item in my cart:
Traceback (most recent call last):
File "/home/frappe/frappe-bench/apps/erpnext/erpnext/erpnext_integrations/doctype/shopify_settings/sync_product.py", line 18, in sync_item_from_shopify
res = session.get(url, headers=get_header(shopify_settings))
File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/requests/sessions.py", line 546, in get
return self.request('GET', url, **kwargs)
File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/requests/sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/requests/sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/requests/adapters.py", line 516, in send
raise ConnectionError(e, request=request)
ConnectionError: HTTPSConnectionPool(host='https', port=443): Max retries exceeded with url: //shop_url.smtshopify.com///admin/products/4446571167882.json (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7fc1d9a18fd0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',))
And if I only have 1 item, I get this error:
Traceback (most recent call last):
File "/home/frappe/frappe-bench/apps/erpnext/erpnext/erpnext_integrations/doctype/shopify_settings/sync_product.py", line 18, in sync_item_from_shopify
res = session.get(url, headers=get_header(shopify_settings))
File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/requests/sessions.py", line 546, in get
return self.request('GET', url, **kwargs)
File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/requests/sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/requests/sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/requests/adapters.py", line 516, in send
raise ConnectionError(e, request=request)
ConnectionError: HTTPSConnectionPool(host='https', port=443): Max retries exceeded with url: //shop_url.smtshopify.com///admin/products/4449798914186.json (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7fc1d9a18fd0>: Failed to establish a new connection: [Errno -2] Name or service not known',))
And not that sure of what it meant…
I also receive 2 logs in shopify log:
1- erpnext.erpnext_integrations.connectors.shopify_connection.prepare_sales_invoice → SUCCESS
2- the log above
I have 1 log in Error Log:
title: erpnext.erpnext_integrations.connectors.shopify_connection.sync_sales_order
error:
Traceback (most recent call last):
File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/background_jobs.py", line 103, in execute_job
method(**kwargs)
File "/home/frappe/frappe-bench/apps/erpnext/erpnext/erpnext_integrations/connectors/shopify_connection.py", line 31, in sync_sales_order
make_shopify_log(status="Error", message=e.message, exception=False)
File "/home/frappe/frappe-bench/apps/erpnext/erpnext/erpnext_integrations/doctype/shopify_log/shopify_log.py", line 29, in make_shopify_log
log.save(ignore_permissions=True)
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 260, in save
return self._save(*args, **kwargs)
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 310, in _save
self.db_update()
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/base_document.py", line 351, in db_update
), list(d.values()) + [name])
File "/home/frappe/frappe-bench/apps/frappe/frappe/database.py", line 199, in sql
self._cursor.execute(query, values)
File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/cursors.py", line 168, in execute
query = self.mogrify(query, args)
File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/cursors.py", line 147, in mogrify
query = query % self._escape_args(args, conn)
File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/cursors.py", line 122, in _escape_args
return tuple(conn.literal(arg) for arg in args)
File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/cursors.py", line 122, in <genexpr>
return tuple(conn.literal(arg) for arg in args)
File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py", line 467, in literal
return self.escape(obj, self.encoders)
File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py", line 460, in escape
return converters.escape_item(obj, self.charset, mapping=mapping)
File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/converters.py", line 27, in escape_item
val = encoder(val, mapping)
File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/converters.py", line 118, in escape_unicode
return u"'%s'" % _escape_unicode(value)
File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/converters.py", line 73, in _escape_unicode
return value.translate(_escape_table)
AttributeError: 'MaxRetryError' object has no attribute 'translate'
I don’t see any kind of connection limit on shopify side, so I really don’t know what could cause all those issue.
Any help would be appreciated!