After an update about 3 days back to the file erpnext.accounts.party.py
on GitHub is resulting into ERPNext is giving error in the function get_party_details
The complete error dump is given below.
App Versions
{
"erpnext": "14.73.2",
"frappe": "14.81.1",
"india_compliance": "14.30.4",
"payments": "0.0.1"
}
Route
point-of-sale
Traceback
Traceback (most recent call last):
File "apps/frappe/frappe/app.py", line 97, in application
response = frappe.api.handle()
File "apps/frappe/frappe/api.py", line 55, in handle
return frappe.handler.handle()
File "apps/frappe/frappe/handler.py", line 48, in handle
data = execute_cmd(cmd)
File "apps/frappe/frappe/handler.py", line 86, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File "apps/frappe/frappe/__init__.py", line 1619, in call
return fn(*args, **newargs)
File "apps/erpnext/erpnext/accounts/party.py", line 74, in get_party_details
return _get_party_details(
File "apps/erpnext/erpnext/accounts/party.py", line 122, in _get_party_details
party_address, shipping_address = set_address_details(
File "apps/erpnext/erpnext/accounts/party.py", line 222, in set_address_details
party_details.update(get_fetch_values(doctype, "company_address", party_details.company_address))
File "apps/frappe/frappe/model/utils/__init__.py", line 113, in get_fetch_values
db_values = frappe.db.get_value(
File "apps/frappe/frappe/database/database.py", line 568, in get_value
result = self.get_values(
File "apps/frappe/frappe/database/database.py", line 672, in get_values
out = self._get_values_from_table(
File "apps/frappe/frappe/database/database.py", line 910, in _get_values_from_table
return query.run(as_dict=as_dict, debug=debug, update=update, run=run, pluck=pluck)
File "apps/frappe/frappe/query_builder/utils.py", line 87, in execute_query
result = frappe.db.sql(query, params, *args, **kwargs) # nosemgrep
File "apps/frappe/frappe/database/database.py", line 244, in sql
self._cursor.execute(query, values)
File "env/lib/python3.10/site-packages/pymysql/cursors.py", line 153, in execute
result = self._query(query)
File "env/lib/python3.10/site-packages/pymysql/cursors.py", line 322, in _query
conn.query(q)
File "env/lib/python3.10/site-packages/pymysql/connections.py", line 563, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
File "env/lib/python3.10/site-packages/pymysql/connections.py", line 825, in _read_query_result
result.read()
File "env/lib/python3.10/site-packages/pymysql/connections.py", line 1199, in read
first_packet = self.connection._read_packet()
File "env/lib/python3.10/site-packages/pymysql/connections.py", line 775, in _read_packet
packet.raise_for_error()
File "env/lib/python3.10/site-packages/pymysql/protocol.py", line 219, in raise_for_error
err.raise_mysql_exception(self._data)
File "env/lib/python3.10/site-packages/pymysql/err.py", line 150, in raise_mysql_exception
raise errorclass(errno, errval)
pymysql.err.OperationalError: (1054, "Unknown column 'emirate' in 'field list'")
Request Data
{
"type": "POST",
"args": {
"posting_date": "2024-09-12",
"party": "jadeja jaydeviba",
"party_type": "Customer",
"account": "Debtors - EEL",
"price_list": "Standard Selling",
"pos_profile": "demo",
"currency": "INR",
"company": "XXXXXXXXX",
"doctype": "POS Invoice"
},
"headers": {},
"error_handlers": {},
"url": "/api/method/erpnext.accounts.party.get_party_details"
}
Response Data
{
"exception": "pymysql.err.OperationalError: (1054, \"Unknown column 'emirate' in 'field list'\")"
}
How to solve this issue?