I am trying to save a new doctype with a single table in it. I got the following error:
Traceback (most recent call last):
File "/home/frappe/ap/apps/frappe/frappe/desk/form/save.py", line 22, in savedocs
doc.save()
File "/home/frappe/ap/apps/frappe/frappe/model/document.py", line 259, in save
return self._save(*args, **kwargs)
File "/home/frappe/ap/apps/frappe/frappe/model/document.py", line 310, in _save
self.run_post_save_methods()
File "/home/frappe/ap/apps/frappe/frappe/model/document.py", line 889, in run_post_save_methods
self.run_method("on_update")
File "/home/frappe/ap/apps/frappe/frappe/model/document.py", line 757, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File "/home/frappe/ap/apps/frappe/frappe/model/document.py", line 1026, in composer
return composed(self, method, *args, **kwargs)
File "/home/frappe/ap/apps/frappe/frappe/model/document.py", line 1009, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File "/home/frappe/ap/apps/frappe/frappe/model/document.py", line 751, in <lambda>
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File "/home/frappe/ap/apps/frappe/frappe/core/doctype/doctype/doctype.py", line 220, in on_update
self.delete_duplicate_custom_fields()
File "/home/frappe/ap/apps/frappe/frappe/core/doctype/doctype/doctype.py", line 261, in delete_duplicate_custom_fields
'''.format('%s', ', '.join(['%s'] * len(fields))), tuple([self.name] + fields), as_dict=True)
File "/home/frappe/ap/apps/frappe/frappe/database.py", line 166, in sql
self._cursor.execute(query, values)
File "/home/frappe/ap/env/local/lib/python2.7/site-packages/pymysql/cursors.py", line 170, in execute
result = self._query(query)
File "/home/frappe/ap/env/local/lib/python2.7/site-packages/pymysql/cursors.py", line 328, in _query
conn.query(q)
File "/home/frappe/ap/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/ap/env/local/lib/python2.7/site-packages/pymysql/connections.py", line 727, in _read_query_result
result.read()
File "/home/frappe/ap/env/local/lib/python2.7/site-packages/pymysql/connections.py", line 1066, in read
first_packet = self.connection._read_packet()
File "/home/frappe/ap/env/local/lib/python2.7/site-packages/pymysql/connections.py", line 683, in _read_packet
packet.check_error()
File "/home/frappe/ap/env/local/lib/python2.7/site-packages/pymysql/protocol.py", line 220, in check_error
err.raise_mysql_exception(self._data)
File "/home/frappe/ap/env/local/lib/python2.7/site-packages/pymysql/err.py", line 109, in raise_mysql_exception
raise errorclass(errno, errval)
ProgrammingError: (1064, u"You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')' at line 4")
Traceback (most recent call last):
File "/home/frappe/ap/apps/frappe/frappe/app.py", line 62, in application
response = frappe.handler.handle()
File "/home/frappe/ap/apps/frappe/frappe/handler.py", line 22, in handle
data = execute_cmd(cmd)
File "/home/frappe/ap/apps/frappe/frappe/handler.py", line 53, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File "/home/frappe/ap/apps/frappe/frappe/__init__.py", line 939, in call
return fn(*args, **newargs)
File "/home/frappe/ap/apps/frappe/frappe/desk/form/save.py", line 22, in savedocs
doc.save()
File "/home/frappe/ap/apps/frappe/frappe/model/document.py", line 259, in save
return self._save(*args, **kwargs)
File "/home/frappe/ap/apps/frappe/frappe/model/document.py", line 310, in _save
self.run_post_save_methods()
File "/home/frappe/ap/apps/frappe/frappe/model/document.py", line 889, in run_post_save_methods
self.run_method("on_update")
File "/home/frappe/ap/apps/frappe/frappe/model/document.py", line 757, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File "/home/frappe/ap/apps/frappe/frappe/model/document.py", line 1026, in composer
return composed(self, method, *args, **kwargs)
File "/home/frappe/ap/apps/frappe/frappe/model/document.py", line 1009, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File "/home/frappe/ap/apps/frappe/frappe/model/document.py", line 751, in <lambda>
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File "/home/frappe/ap/apps/frappe/frappe/core/doctype/doctype/doctype.py", line 220, in on_update
self.delete_duplicate_custom_fields()
File "/home/frappe/ap/apps/frappe/frappe/core/doctype/doctype/doctype.py", line 261, in delete_duplicate_custom_fields
'''.format('%s', ', '.join(['%s'] * len(fields))), tuple([self.name] + fields), as_dict=True)
File "/home/frappe/ap/apps/frappe/frappe/database.py", line 166, in sql
self._cursor.execute(query, values)
File "/home/frappe/ap/env/local/lib/python2.7/site-packages/pymysql/cursors.py", line 170, in execute
result = self._query(query)
File "/home/frappe/ap/env/local/lib/python2.7/site-packages/pymysql/cursors.py", line 328, in _query
conn.query(q)
File "/home/frappe/ap/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/ap/env/local/lib/python2.7/site-packages/pymysql/connections.py", line 727, in _read_query_result
result.read()
File "/home/frappe/ap/env/local/lib/python2.7/site-packages/pymysql/connections.py", line 1066, in read
first_packet = self.connection._read_packet()
File "/home/frappe/ap/env/local/lib/python2.7/site-packages/pymysql/connections.py", line 683, in _read_packet
packet.check_error()
File "/home/frappe/ap/env/local/lib/python2.7/site-packages/pymysql/protocol.py", line 220, in check_error
err.raise_mysql_exception(self._data)
File "/home/frappe/ap/env/local/lib/python2.7/site-packages/pymysql/err.py", line 109, in raise_mysql_exception
raise errorclass(errno, errval)
ProgrammingError: (1064, u"You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')' at line 4")
Now I am unable to create any new doctypes.