1054, u"Unknown column 'default_supplier' in 'field list'"

hi @Guys
I’m so sorry if its a repeated topic
Please help to resolve this issue
in

Installed Apps
ERPNext: v10.1.56 (master)

ERPNext Shopify: v2.0.26 (master)

Frappe Framework: v10.1.50 (master)

in new installation; when I sync to shopify I get


shopify log

Traceback (most recent call last):
  File "/opt/bench/erpnext/apps/erpnext_shopify/erpnext_shopify/api.py", line 32, in sync_shopify_resources
    sync_products(shopify_settings.price_list, shopify_settings.warehouse)
  File "/opt/bench/erpnext/apps/erpnext_shopify/erpnext_shopify/sync_products.py", line 18, in sync_products
    sync_erpnext_items(price_list, warehouse, shopify_item_list)
  File "/opt/bench/erpnext/apps/erpnext_shopify/erpnext_shopify/sync_products.py", line 338, in sync_erpnext_items
    for item in get_erpnext_items(price_list):
  File "/opt/bench/erpnext/apps/erpnext_shopify/erpnext_shopify/sync_products.py", line 366, in get_erpnext_items
    erpnext_items.extend(frappe.db.sql(item_from_master, as_dict=1))
  File "/opt/bench/erpnext/apps/frappe/frappe/database/database.py", line 165, in sql
    self._cursor.execute(query)
  File "/opt/bench/erpnext/env/local/lib/python2.7/site-packages/pymysql/cursors.py", line 170, in execute
    result = self._query(query)
  File "/opt/bench/erpnext/env/local/lib/python2.7/site-packages/pymysql/cursors.py", line 328, in _query
    conn.query(q)
  File "/opt/bench/erpnext/env/local/lib/python2.7/site-packages/pymysql/connections.py", line 516, in query
    self._affected_rows = self._read_query_result(unbuffered=unbuffered)
  File "/opt/bench/erpnext/env/local/lib/python2.7/site-packages/pymysql/connections.py", line 727, in _read_query_result
    result.read()
  File "/opt/bench/erpnext/env/local/lib/python2.7/site-packages/pymysql/connections.py", line 1066, in read
    first_packet = self.connection._read_packet()
  File "/opt/bench/erpnext/env/local/lib/python2.7/site-packages/pymysql/connections.py", line 683, in _read_packet
    packet.check_error()
  File "/opt/bench/erpnext/env/local/lib/python2.7/site-packages/pymysql/protocol.py", line 220, in check_error
    err.raise_mysql_exception(self._data)
  File "/opt/bench/erpnext/env/local/lib/python2.7/site-packages/pymysql/err.py", line 109, in raise_mysql_exception
    raise errorclass(errno, errval)
InternalError: (1054, u"Unknown column 'default_supplier' in 'field list'")

when installation finished I switched to master branch by running git checkout -b master in apps/frappe & apps/erpnext and then installed erpnext_shopify. and then run bench migrate and then run bench update still there is no any error.

but when I sync i get the above error.

this is another created issue I tried but didn’t solve.

I switched apps/erpnext_shopify also to master branch by running git checkout -b master now all the installed apps are in branch master and I did run bench update --patch there is not any error

but sync problem is still there

I’m having the same problem atm. I even tried to define the default supplier for my testing products and it wont help.

Seems like the column ‘default_supplier’ should exists in database somewhere, but it does not or might have been changed. I also tried updating, migrating and reinstalling the whole site on the bench. I’m using the newest version of erpnext and erpnext shopify connector.

You can fix the issue by adding a new column “default_supplier” under tabItem in database, then the sync goes through.

I believe this solution is only temporary until the connector or something get’s changed again. Found that the erpnext_shopify connector uses the “missing” column in it’s queries and therefore the synchonization fails.