ERPNext Shopify Integration Fails

I have gone through and followed all the steps required to get the Shopify integration running on the cloud hosted ERPNext solution.

When a new order is entered in the shopify site, we get a push to sync.

What Worked:
New customer information was created in ERPNext.

What Didn’t Work:
No products were imported
No sales order created
Error Log (See Below)

Traceback (most recent call last):
  File "/home/frappe/benches/bench-2019-01-09/apps/frappe/frappe/utils/", line 103, in execute_job
  File "/home/frappe/benches/bench-2019-01-09/apps/erpnext/erpnext/erpnext_integrations/connectors/", line 31, in sync_sales_order
    make_shopify_log(status="Error", message=e.message, exception=False)
  File "/home/frappe/benches/bench-2019-01-09/apps/erpnext/erpnext/erpnext_integrations/doctype/shopify_log/", line 29, in make_shopify_log
  File "/home/frappe/benches/bench-2019-01-09/apps/frappe/frappe/model/", line 260, in save
return self._save(*args, **kwargs)
  File "/home/frappe/benches/bench-2019-01-09/apps/frappe/frappe/model/", line 310, in _save
  File "/home/frappe/benches/bench-2019-01-09/apps/frappe/frappe/model/", line 351, in db_update
    ), list(d.values()) + [name])
  File "/home/frappe/benches/bench-2019-01-09/apps/frappe/frappe/", line 199, in sql
self._cursor.execute(query, values)
  File "/home/frappe/benches/bench-2019-01-09/env/lib/python2.7/site-packages/pymysql/", line 168, in execute
query = self.mogrify(query, args)
      File "/home/frappe/benches/bench-2019-01-09/env/lib/python2.7/site-packages/pymysql/", line 147, in mogrify
    query = query % self._escape_args(args, conn)
  File "/home/frappe/benches/bench-2019-01-09/env/lib/python2.7/site-packages/pymysql/", line 122, in _escape_args
    return tuple(conn.literal(arg) for arg in args)
  File "/home/frappe/benches/bench-2019-01-09/env/lib/python2.7/site-packages/pymysql/", line 122, in <genexpr>
return tuple(conn.literal(arg) for arg in args)
  File "/home/frappe/benches/bench-2019-01-09/env/lib/python2.7/site-packages/pymysql/", 
line 467, in literal
    return self.escape(obj, self.encoders)
  File "/home/frappe/benches/bench-2019-01-09/env/lib/python2.7/site-packages/pymysql/", 
line 460, in escape
    return converters.escape_item(obj, self.charset, mapping=mapping)
  File "/home/frappe/benches/bench-2019-01-09/env/lib/python2.7/site-packages/pymysql/", 
line 27, in escape_item
    val = encoder(val, mapping)
  File "/home/frappe/benches/bench-2019-01-09/env/lib/python2.7/site-packages/pymysql/", 
line 118, in escape_unicode
    return u"'%s'" % _escape_unicode(value)
  File "/home/frappe/benches/bench-2019-01-09/env/lib/python2.7/site-packages/pymysql/", 
line 73, in _escape_unicode
    return value.translate(_escape_table)
AttributeError: 'MaxRetryError' object has no attribute 'translate'

At this time I am unable to find any reason why this error would be coming up, as this the the first integration test run and no settings have been modified. Any ideas or assistance in getting this cleared up would be greatly appreciated.

Any Luck since then? I got the exact same issue!

Same Problem !! Any feedback
I got the following error:

AttributeError: ‘MaxRetryError’ object has no attribute ‘translate’

@Amr_El_Masry1 you are in luck! (well, only if you’re running on v11…)
This is caused because of the log. Here’s the solution:
go to Erpnext.erpnext.erpnext_integration.doctype.shopify_log.shopify_log, create a new method ‘get_message(exception)’

def get_message(exception):  
  message = None  
  if hasattr(exception, 'message'):  
    message = exception.message  
  elif hasattr(exception, '__str__'):  
    message = exception.__str__()  
    message = "Something went wrong while syncing"  
  return message 

Then Modify the first method below (make_shopify_log) where
Log.message = ... to Log.message = get_message(message)
That fixed my issue!

@rmehta I could not able to integrate erpnext with shopify

  • There are two ways to integrate
    i) Find the ERPNext app in the shopify app store and connect
    ii) In Shopify settings, by providing the api crefdentials and by clicking the sync shopify button
  • first way I tried but I there is no ERPPNext app in shoppify app store
  • second way I tried but I could not able to find the sync shopify button on the top
    please help, thanks in advance