ERPNext Foundation ERPNext Cloud User Manual Blog Discuss Frappé* Donate

Unknown column error after v11 update (11.1.4 master)

update_problem

#1

When I click on a customer in Selling, customer:

Traceback (most recent call last):
  File "/home/frappe/frappe-bench/apps/frappe/frappe/app.py", line 61, in application
    response = frappe.handler.handle()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/handler.py", line 21, in handle
    data = execute_cmd(cmd)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/handler.py", line 56, in execute_cmd
    return frappe.call(method, **frappe.form_dict)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 1019, in call
    return fn(*args, **newargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/desk/notifications.py", line 279, in get_open_count
    filters=filters, limit=100, distinct=True, ignore_ifnull=True))
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 1274, in get_all
    return get_list(doctype, *args, **kwargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 1247, in get_list
    return frappe.model.db_query.DatabaseQuery(doctype).execute(None, *args, **kwargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/db_query.py", line 93, in execute
    result = self.build_and_run()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/db_query.py", line 117, in build_and_run
    return frappe.db.sql(query, as_dict=not self.as_list, debug=self.debug, update=self.update)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/database.py", line 210, in sql
    self._cursor.execute(query)
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/cursors.py", line 170, in execute
    result = self._query(query)
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/cursors.py", line 328, in _query
    conn.query(q)
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py", line 516, in query
    self._affected_rows = self._read_query_result(unbuffered=unbuffered)
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py", line 727, in _read_query_result
    result.read()
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py", line 1066, in read
    first_packet = self.connection._read_packet()
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py", line 683, in _read_packet
    packet.check_error()
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/protocol.py", line 220, in check_error
    err.raise_mysql_exception(self._data)
  File "/home/frappe/frappe-bench/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 'tabRequest for Quotation.customer' in 'where clause'")

No error in v10 instance. Data was backed up from 10 and restored to 11.


#2

Just updated to 11.1.4
I’m getting a similar error after updating, when viewing a Sales Invoice. I guess I could add the column manually to the db, but if there’s a DocType update that’s incomplete…

InternalError: (1054, u"Unknown column ‘tabPurchase Receipt.sales_invoice’ in ‘where clause’")

Mike

``


#3

Do you have an idea to which column in which table the error refers to? I still have 10 instance operating and can compare tables using bench mysql/mariadb, DESCRIBE [tableName]


#4

I was actually getting a lot of missing column errors in a number of different DocTypes, so I restored my system back to the previous version. I’ll give it another go when time permits.

Mike


#5

Progress:

Tried a bench update again, noting the complaints about nodejs etc . So I manually installed nodejs and yarn to newer versions:

curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
sudo apt-get install -y nodejs

curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
 sudo apt-get update && sudo apt-get install yarn

Restored database from working v10 , ran bench update and bench migrate and I haven’t encountered the problem again.