Getting Syntax error in

Recently moved from ERPNext V13 to V14 While restoring the V13 database in V14 we’ve faced some minor issued and we fixed that too.
Now while restroing the V14 database in V14 I am getting Syntax error invalid syntax in

Is anyone ever faced this problem? or can anyone give me any solution?


It may help to post the output of bench version. Has the --force option been tried with bench restore? Also see what bench migrate returns.

Hi @smino
I am using 5.17.1Version of bench

I’ve also treid restore command with force option (–force) and it’ll get completed too
But after that whenever I do bench migrate I am getting error like tabWeb Form doesn’t exist

  unbuffered = False
  File "/home/frappe/frappe-bench/env/lib/python3.10/site-packages/pymysql/", line 779, in _read_query_result
      self = <pymysql.connections.Connection object at 0x7fd4553576d0>
      unbuffered = False
      result = <pymysql.connections.MySQLResult object at 0x7fd45503e440>
  File "/home/frappe/frappe-bench/env/lib/python3.10/site-packages/pymysql/", line 1157, in read
    first_packet = self.connection._read_packet()
      self = <pymysql.connections.MySQLResult object at 0x7fd45503e440>
  File "/home/frappe/frappe-bench/env/lib/python3.10/site-packages/pymysql/", line 729, in _read_packet
      self = <pymysql.connections.Connection object at 0x7fd4553576d0>
      packet_type = <class 'pymysql.protocol.MysqlPacket'>
      buff = bytearray(b"\xffz\x04#42S02Table \'_02c69839f777bfb5.tabWeb Form\' doesn\'t exist")
      packet_header = b'<\x00\x00\x01'
      btrl = 60
      btrh = 0
      packet_number = 1
      bytes_to_read = 60
      recv_data = b"\xffz\x04#42S02Table '_02c69839f777bfb5.tabWeb Form' doesn't exist"
      packet = <pymysql.protocol.MysqlPacket object at 0x7fd4550c8850>
  File "/home/frappe/frappe-bench/env/lib/python3.10/site-packages/pymysql/", line 221, in raise_for_error
      self = <pymysql.protocol.MysqlPacket object at 0x7fd4550c8850>
      errno = 1146
  File "/home/frappe/frappe-bench/env/lib/python3.10/site-packages/pymysql/", line 143, in raise_mysql_exception
    raise errorclass(errno, errval)
      data = b"\xffz\x04#42S02Table '_02c69839f777bfb5.tabWeb Form' doesn't exist"
      errno = 1146
      errval = "Table '_02c69839f777bfb5.tabWeb Form' doesn't exist"
      errorclass = <class 'pymysql.err.ProgrammingError'>
pymysql.err.ProgrammingError: (1146, "Table '_02c69839f777bfb5.tabWeb Form' doesn't exist")

In a bench console try:

frappe.reload_doctype('tabWeb Form')

then bench update --reset