Try ERPNext Buy Support Partners Foundation

[Error]'Lock wait timeout exceeded; try restarting transaction

I get this error and I don’t know why :frowning:

Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/accounts/doctype/sales_invoice/pos.py”, line 580, in submit_invoice
si_doc.insert()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 217, in insert
self.set_new_name()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 378, in set_new_name
set_new_name(self)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/naming.py”, line 42, in set_new_name
set_name_from_naming_options(autoname, doc)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/naming.py”, line 71, in set_name_from_naming_options
set_name_by_naming_series(doc)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/naming.py”, line 87, in set_name_by_naming_series
doc.name = make_autoname(doc.naming_series+’.#####’, ‘’, doc)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/naming.py”, line 116, in make_autoname
n = parse_naming_series(parts, doctype, doc)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/naming.py”, line 131, in parse_naming_series
part = getseries(n, digits, doctype)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/naming.py”, line 159, in getseries
current = frappe.db.sql(“select current from tabSeries where name=%s for update”, (key,))
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/lib/python3.6/site-packages/pymysql/cursors.py”, line 170, in execute
result = self._query(query)
File “/home/frappe/frappe-bench/env/lib/python3.6/site-packages/pymysql/cursors.py”, line 328, in _query
conn.query(q)
File “/home/frappe/frappe-bench/env/lib/python3.6/site-packages/pymysql/connections.py”, line 517, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
File “/home/frappe/frappe-bench/env/lib/python3.6/site-packages/pymysql/connections.py”, line 732, in _read_query_result
result.read()
File “/home/frappe/frappe-bench/env/lib/python3.6/site-packages/pymysql/connections.py”, line 1082, in read
self._read_result_packet(first_packet)
File “/home/frappe/frappe-bench/env/lib/python3.6/site-packages/pymysql/connections.py”, line 1152, in _read_result_packet
self._read_rowdata_packet()
File “/home/frappe/frappe-bench/env/lib/python3.6/site-packages/pymysql/connections.py”, line 1186, in _read_rowdata_packet
packet = self.connection._read_packet()
File “/home/frappe/frappe-bench/env/lib/python3.6/site-packages/pymysql/connections.py”, line 684, in _read_packet
packet.check_error()
File “/home/frappe/frappe-bench/env/lib/python3.6/site-packages/pymysql/protocol.py”, line 220, in check_error
err.raise_mysql_exception(self._data)
File “/home/frappe/frappe-bench/env/lib/python3.6/site-packages/pymysql/err.py”, line 109, in raise_mysql_exception
raise errorclass(errno, errval)
pymysql.err.InternalError: (1205, ‘Lock wait timeout exceeded; try restarting transaction’)