OperationalError: (1054, "Unknown column 'route' in 'field list'")

Installed on CentOS 7 droplet. All was well for about one week. Today, unable to access; noted mysql wasn’t running. Started mysql and all was well - for a couple of hours. Was setting up payment methods, and page crashed.
Restarted in fresh browser window, login works, but i get only the [E] logo and the word “ERPnext” on a white screen.
if I go back, and select “My account”, page seems normal, but if I select “edit profile”, I get a different user…
Any other selection “Projects Request for Quotations Orders Invoices Shipments Issues Addresses Supplier Quotation…”
i get
Oops, a server error has occured

Traceback (most recent call last):

File “/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py”, line 32, in render
data = render_page_by_language(path)
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py”, line 101, in render_page_by_language
return render_page(path)
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py”, line 117, in render_page
return build(path)
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py”, line 124, in build
return build_page(path)
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py”, line 137, in build_page
context = get_context(path)
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/context.py”, line 14, in get_context
context = get_page_context(path)
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/router.py”, line 35, in get_page_context
page_context = make_page_context(path)
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/router.py”, line 44, in make_page_context
context = resolve_route(path)
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/router.py”, line 21, in resolve_route
return get_page_context_from_doctype(path)
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/router.py”, line 75, in get_page_context_from_doctype
page_info = get_page_info_from_doctypes(path)
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/router.py”, line 107, in get_page_info_from_doctypes
{1}“”".format(doctype, condition), values=values, as_dict=True):
File “/home/frappe/frappe-bench/apps/frappe/frappe/database.py”, line 137, in sql
self._cursor.execute(query, values)
File “/home/frappe/frappe-bench/env/lib/python2.7/site-packages/MySQLdb/cursors.py”, line 205, in execute
self.errorhandler(self, exc, value)
File “/home/frappe/frappe-bench/env/lib/python2.7/site-packages/MySQLdb/connections.py”, line 36, in defaulterrorhandler
raise errorclass, errorvalue
OperationalError: (1054, “Unknown column ‘route’ in ‘field list’”)

Seems code and database schema is different.
Try bench update

Thank you saurabh6790,
but i get “OSError: [Errno 2] No such file or directory: ‘./apps/frappe’”
when running bench update

Run the bench command from the ~/frappe-bench folder

bench update error:
INFO:bench.utils:updating bench
Already up-to-date.
fatal: Invalid refspec ‘+refs/heads/:refs/remotes/upstream/
git fetch upstream
cd -
cd apps/erpnext
git config --add remote.upstream.fetch +refs/heads/:refs/remotes/upstream/
fatal: Invalid refspec ‘+refs/heads/:refs/remotes/upstream/
git fetch upstream
cd -
cd apps/erpnext
git config --add remote.upstream.fetch +refs/heads/:refs/remotes/upstream/
Requirement already satisfied: Pillow in ./env/lib/python2.7/site-packages
Requirement already satisfied: olefile in ./env/lib/python2.7/site-packages (from Pillow)
Traceback (most recent call last):
File “/usr/bin/bench”, line 11, in
load_entry_point(‘bench’, ‘console_scripts’, ‘bench’)()
File “/home/frappe/.bench/bench/cli.py”, line 40, in cli
bench_command()
File “/usr/lib64/python2.7/site-packages/click/core.py”, line 722, in call
return self.main(*args, **kwargs)
File “/usr/lib64/python2.7/site-packages/click/core.py”, line 697, in main
rv = self.invoke(ctx)
File “/usr/lib64/python2.7/site-packages/click/core.py”, line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/lib64/python2.7/site-packages/click/core.py”, line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/lib64/python2.7/site-packages/click/core.py”, line 535, in invoke
return callback(*args, **kwargs)
File “/home/frappe/.bench/bench/commands/update.py”, line 62, in update
_update(pull, patch, build, bench, auto, restart_supervisor, requirements, no_backup, upgrade, force=force, reset=reset)
File “/home/frappe/.bench/bench/commands/update.py”, line 78, in _update
pull_all_apps(bench_path=bench_path, reset=reset)
File “/home/frappe/.bench/bench/app.py”, line 138, in pull_all_apps
remote = get_remote(app)
File “/home/frappe/.bench/bench/app.py”, line 182, in get_remote
stderr=subprocess.STDOUT)
File “/usr/lib64/python2.7/subprocess.py”, line 575, in check_output
raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command ‘[‘git’, ‘remote’, ‘-v’]’ returned non-zero exit status 128

Removed module “Knowledge Base” and all is now well :slight_smile:

Hello,
How you have removed module “Knowledge Base” i.e from where. Can you please explain?
Thanks

EPRNext Application installer, Category=Portal

Hello @chrisklinger, @Arpit_Goyal I have the same problem please tell me how to solve it.
i don’t know how to remove module “Knowledge Base”.
best regards

Hello Omar_Salah,
From desktop, I went to Setup. There, I found, under “Integrations”, Application Installer.
Once there, select category “Portal”
You may be able to use the shortcut http://yoursite/desk#applications

Best of luck, hope this helps you.

Chris

Hello Omar,
No need to remove anything. It happens when pyhton files and database are not synchronized. You just need to run “update bench” command from your bench folder. Make sure to stop bench before running this command.

Thanks & Regards,
Arpit