Syntax error in query while updating or patching

Hi,

My enviroment and app versions:

Ubuntu 18.04.5 LTS
Frappe 13.11.0
ErpNext 13.11.1

When updating with bench update I always get stuck with the following error message.

Success: Done in 0.236s
Updating DocTypes for frappe : [====================] 100%
Updating DocTypes for erpnext : [====================] 100%
Updating Dashboard for frappe
Updating Dashboard for erpnext
Updating customizations for Address
Updating customizations for Contact
Building search index for erp.lastamar.be
Syntax error in query:
select route
from tabBlog Category
where tabBlog Category.1 = 1.0

                     order 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 128, in build_index_for_all_routes
return ws.build()
File “/home/benjamien/frappe-bench/apps/frappe/frappe/search/full_text_search.py”, line 36, in build
self.documents = self.get_items_to_index()
File “/home/benjamien/frappe-bench/apps/frappe/frappe/search/website_search.py”, line 38, 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 96, 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 1459, in get_all
return get_list(doctype, *args, **kwargs)
File “/home/benjamien/frappe-bench/apps/frappe/frappe/init.py”, line 1432, 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 153, 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 by tabBlog Category.modified DESC’ at line 3”)

Can anyone help me to resolve this ?

Thanks.

Can anyone help please ?
Or where can I find this query so I can change it myself.

Thanks.