Hi,
I have a recurring problem when updating.
This error is present for a while now, but I can get past it by editing the common_site_config.json file and setting the maintenance_mode to 0.
But I would like to get this fixed to my updates run smooth again.
Thanks.
My environment:
Ubuntu 18.04 LTS
Frappe v13.15.0
Erpnext v13.15.2
The error:
Syntax error in query:
selectroute
fromtabBlog Category
wheretabBlog Category
.1 = 1.0order by `tabBlog Category`.`modified` DESC
Traceback (most recent call last):
File “/usr/lib/python3.6/runpy.py”, line 193, in _run_module_as_main
“main”, mod_spec)
File “/usr/lib/python3.6/runpy.py”, line 85, in _run_code
exec(code, run_globals)
File “/home/benjamien/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 104, in
main()
File “/home/benjamien/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 19, in main
click.Group(commands=commands)(prog_name=‘bench’)
File “/home/benjamien/frappe-bench/env/lib/python3.6/site-packages/click/core.py”, line 829, in call
return self.main(*args, **kwargs)
File “/home/benjamien/frappe-bench/env/lib/python3.6/site-packages/click/core.py”, line 782, in main
rv = self.invoke(ctx)
File “/home/benjamien/frappe-bench/env/lib/python3.6/site-packages/click/core.py”, line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/benjamien/frappe-bench/env/lib/python3.6/site-packages/click/core.py”, line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/benjamien/frappe-bench/env/lib/python3.6/site-packages/click/core.py”, line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/benjamien/frappe-bench/env/lib/python3.6/site-packages/click/core.py”, line 610, in invoke
return callback(*args, **kwargs)
File “/home/benjamien/frappe-bench/env/lib/python3.6/site-packages/click/decorators.py”, line 21, in new_func
return f(get_current_context(), *args, **kwargs)
File “/home/benjamien/frappe-bench/apps/frappe/frappe/commands/init.py”, line 27, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
File “/home/benjamien/frappe-bench/apps/frappe/frappe/commands/site.py”, line 309, in migrate
skip_search_index=skip_search_index
File “/home/benjamien/frappe-bench/apps/frappe/frappe/migrate.py”, line 95, in migrate
build_index_for_all_routes()
File “/home/benjamien/frappe-bench/apps/frappe/frappe/search/website_search.py”, line 131, in build_index_for_all_routes
return ws.build()
File “/home/benjamien/frappe-bench/apps/frappe/frappe/search/full_text_search.py”, line 41, in build
self.documents = self.get_items_to_index()
File “/home/benjamien/frappe-bench/apps/frappe/frappe/search/website_search.py”, line 41, in get_items_to_index
routes = get_static_pages_from_all_apps() + slugs_with_web_view()
File “/home/benjamien/frappe-bench/apps/frappe/frappe/search/website_search.py”, line 99, in slugs_with_web_view
routes = frappe.get_all(doctype.name, filters={doctype.is_published_field: 1}, fields=“route”)
File “/home/benjamien/frappe-bench/apps/frappe/frappe/init.py”, line 1469, in get_all
return get_list(doctype, *args, **kwargs)
File “/home/benjamien/frappe-bench/apps/frappe/frappe/init.py”, line 1442, in get_list
return frappe.model.db_query.DatabaseQuery(doctype).execute(*args, **kwargs)
File “/home/benjamien/frappe-bench/apps/frappe/frappe/model/db_query.py”, line 107, in execute
result = self.build_and_run()
File “/home/benjamien/frappe-bench/apps/frappe/frappe/model/db_query.py”, line 145, in build_and_run
update=self.update, ignore_ddl=self.ignore_ddl)
File “/home/benjamien/frappe-bench/apps/frappe/frappe/database/database.py”, line 154, in sql
self._cursor.execute(query)
File “/home/benjamien/frappe-bench/env/lib/python3.6/site-packages/pymysql/cursors.py”, line 148, in execute
result = self._query(query)
File “/home/benjamien/frappe-bench/env/lib/python3.6/site-packages/pymysql/cursors.py”, line 310, in _query
conn.query(q)
File “/home/benjamien/frappe-bench/env/lib/python3.6/site-packages/pymysql/connections.py”, line 548, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
File “/home/benjamien/frappe-bench/env/lib/python3.6/site-packages/pymysql/connections.py”, line 775, in _read_query_result
result.read()
File “/home/benjamien/frappe-bench/env/lib/python3.6/site-packages/pymysql/connections.py”, line 1156, in read
first_packet = self.connection._read_packet()
File “/home/benjamien/frappe-bench/env/lib/python3.6/site-packages/pymysql/connections.py”, line 725, in _read_packet
packet.raise_for_error()
File “/home/benjamien/frappe-bench/env/lib/python3.6/site-packages/pymysql/protocol.py”, line 221, in raise_for_error
err.raise_mysql_exception(self._data)
File “/home/benjamien/frappe-bench/env/lib/python3.6/site-packages/pymysql/err.py”, line 143, in raise_mysql_exception
raise errorclass(errno, errval)
pymysql.err.ProgrammingError: (1064, “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 ‘.1 = 1.0\n\t\t\t\n\t\t\t order bytabBlog Category
.modified
DESC’ at line 3”)