Unable to redirect to desk after Login

Hi there,
I am trying to redirect to desk but unable to do so.
I have earlier switched my bench to production mode and later again switched backed to develop mode.
But now when i started the bench and trying to login into the system i am unable to do so.
I am getting the following error:

Module import failed for Communication (frappe.core.doctype.communication.communication)

I havent done any changes in this doctype.

What can be wrong on this?

Full error trace please?

Have you tried rebooting?

Yeah i tried rebooting as well.

Traceback:

12:40:03 web.1 | Module import failed for Help Article (frappe.core.doctype.help_article.help_article)
12:40:03 web.1 | Traceback (most recent call last):
12:40:03 web.1 | File “/home/user/frappe-bench/apps/frappe/frappe/website/render.py”, line 32, in render
12:40:03 web.1 | data = render_page_by_language(path)
12:40:03 web.1 | File “/home/user/frappe-bench/apps/frappe/frappe/website/render.py”, line 101, in render_page_by_language
12:40:03 web.1 | return render_page(path)
12:40:03 web.1 | File “/home/user/frappe-bench/apps/frappe/frappe/website/render.py”, line 117, in render_page
12:40:03 web.1 | return build(path)
12:40:03 web.1 | File “/home/user/frappe-bench/apps/frappe/frappe/website/render.py”, line 124, in build
12:40:03 web.1 | return build_page(path)
12:40:03 web.1 | File “/home/user/frappe-bench/apps/frappe/frappe/website/render.py”, line 137, in build_page
12:40:03 web.1 | context = get_context(path)
12:40:03 web.1 | File “/home/user/frappe-bench/apps/frappe/frappe/website/context.py”, line 14, in get_context
12:40:03 web.1 | context = get_page_context(path)
12:40:03 web.1 | File “/home/user/frappe-bench/apps/frappe/frappe/website/router.py”, line 35, in get_page_context
12:40:03 web.1 | page_context = make_page_context(path)
12:40:03 web.1 | File “/home/user/frappe-bench/apps/frappe/frappe/website/router.py”, line 44, in make_page_context
12:40:03 web.1 | context = resolve_route(path)
12:40:03 web.1 | File “/home/user/frappe-bench/apps/frappe/frappe/website/router.py”, line 21, in resolve_route
12:40:03 web.1 | return get_page_context_from_doctype(path)
12:40:03 web.1 | File “/home/user/frappe-bench/apps/frappe/frappe/website/router.py”, line 72, in get_page_context_from_doctype
12:40:03 web.1 | page_info = get_page_info_from_doctypes(path)
12:40:03 web.1 | File “/home/user/frappe-bench/apps/frappe/frappe/website/router.py”, line 94, in get_page_info_from_doctypes
12:40:03 web.1 | controller = get_controller(doctype)
12:40:03 web.1 | File “/home/user/frappe-bench/apps/frappe/frappe/model/base_document.py”, line 34, in get_controller
12:40:03 web.1 | module = load_doctype_module(doctype, module_name)
12:40:03 web.1 | File “/home/user/frappe-bench/apps/frappe/frappe/modules/utils.py”, line 171, in load_doctype_module
12:40:03 web.1 | doctype_python_modules[key] = frappe.get_module(module_name)
12:40:03 web.1 | File “/home/user/frappe-bench/apps/frappe/frappe/init.py”, line 651, in get_module
12:40:03 web.1 | return importlib.import_module(modulename)
12:40:03 web.1 | File “/usr/lib/python2.7/importlib/init.py”, line 37, in import_module
12:40:03 web.1 | import(name)
12:40:03 web.1 | ImportError: No module named help_article.help_article
12:40:03 web.1 |
12:40:03 web.1 | 127.0.0.1 - - [07/Dec/2016 12:40:03] “GET /favicon.ico HTTP/1.1” 500 -

Please follow these steps. I hope it will resolve your issue.

  1. Update your frappe develop branch via git pull

  2. Run bench update command

Will running bench update delete all the data?

Didn’t get you?
By the way bench update will update the frappe framework and sync the json files in the database. All of the data in the database will remain unaffected.

I tried to do the same you asked but didnt help.
Instead faced an error.

Traceback (most recent call last):
File “/usr/local/bin/bench”, line 9, in
load_entry_point(‘bench==4.1.0’, ‘console_scripts’, ‘bench’)()
File “/home/user/bench-repo/bench/cli.py”, line 40, in cli
bench_command()
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 716, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 696, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 534, in invoke
return callback(*args, **kwargs)
File “/home/user/bench-repo/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/user/bench-repo/bench/commands/update.py”, line 78, in _update
pull_all_apps(bench_path=bench_path, reset=reset)
File “/home/user/bench-repo/bench/app.py”, line 146, in pull_all_apps
remote=remote, branch=get_current_branch(app, bench_path=bench_path)), cwd=app_dir)
File “/home/user/bench-repo/bench/utils.py”, line 127, in exec_cmd
raise CommandFailedError(cmd)
bench.utils.CommandFailedError: git pull upstream develop

Also after doing it i tried again but still no luck.

Hi there,
facing following error after performing migrate function:

Traceback (most recent call last):
File “/usr/lib/python2.7/runpy.py”, line 162, in _run_module_as_main
main”, fname, loader, pkg_name)
File “/usr/lib/python2.7/runpy.py”, line 72, in _run_code
exec code in run_globals
File “/home/user/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 79, in
main()
File “/home/user/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 16, in main
click.Group(commands=commands)(prog_name=‘bench’)
File “/home/user/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 716, in call
return self.main(*args, **kwargs)
File “/home/user/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 696, in main
rv = self.invoke(ctx)
File “/home/user/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/user/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/user/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/user/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 534, in invoke
return callback(*args, **kwargs)
File “/home/user/frappe-bench/env/local/lib/python2.7/site-packages/click/decorators.py”, line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File “/home/user/frappe-bench/apps/frappe/frappe/commands/init.py”, line 24, in _func
ret = f(frappe.dict(ctx.obj), *args, **kwargs)
File “/home/user/frappe-bench/apps/frappe/frappe/commands/site.py”, line 209, in migrate
migrate(context.verbose, rebuild_website=rebuild_website)
File “/home/user/frappe-bench/apps/frappe/frappe/migrate.py”, line 30, in migrate
frappe.modules.patch_handler.run_all()
File “/home/user/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 29, in run_all
if not run_single(patchmodule = patch):
File “/home/user/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 63, in run_single
return execute_patch(patchmodule, method, methodargs)
File “/home/user/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 83, in execute_patch
frappe.get_attr(patchmodule.split()[0] + “.execute”)()
File “/home/user/frappe-bench/apps/frappe/frappe/init.py”, line 863, in get_attr
throw(
(“App {0} is not installed”).format(app_name), AppNotInstalledError)
File “/home/user/frappe-bench/apps/frappe/frappe/init.py”, line 300, in throw
msgprint(msg, raise_exception=exc, title=title, indicator=‘red’)
File “/home/user/frappe-bench/apps/frappe/frappe/init.py”, line 293, in msgprint
_raise_exception()
File “/home/user/frappe-bench/apps/frappe/frappe/init.py”, line 266, in _raise_exception
raise raise_exception, encode(msg)
frappe.exceptions.AppNotInstalledError: App <<<<<<< is not installed

Have you installed any app like erpnext in your site?

Yes I was working earlier on the same site,

Hi there,
After restoring to previous instance now receiving the following error:

user@User-ThinkPad-T400:~/frappe-bench$ bench --site erpnext.dev migrate
Migrating erpnext.dev
Traceback (most recent call last):
File “/usr/lib/python2.7/runpy.py”, line 162, in _run_module_as_main
main”, fname, loader, pkg_name)
File “/usr/lib/python2.7/runpy.py”, line 72, in _run_code
exec code in run_globals
File “/home/user/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 79, in
main()
File “/home/user/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 16, in main
click.Group(commands=commands)(prog_name=‘bench’)
File “/home/user/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 716, in call
return self.main(*args, **kwargs)
File “/home/user/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 696, in main
rv = self.invoke(ctx)
File “/home/user/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/user/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/user/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/user/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 534, in invoke
return callback(*args, **kwargs)
File “/home/user/frappe-bench/env/local/lib/python2.7/site-packages/click/decorators.py”, line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File “/home/user/frappe-bench/apps/frappe/frappe/commands/init.py”, line 24, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
File “/home/user/frappe-bench/apps/frappe/frappe/commands/site.py”, line 209, in migrate
migrate(context.verbose, rebuild_website=rebuild_website)
File “/home/user/frappe-bench/apps/frappe/frappe/migrate.py”, line 32, in migrate
frappe.model.sync.sync_all(verbose=verbose)
File “/home/user/frappe-bench/apps/frappe/frappe/model/sync.py”, line 19, in sync_all
sync_for(app, force, verbose=verbose)
File “/home/user/frappe-bench/apps/frappe/frappe/model/sync.py”, line 44, in sync_for
import_file_by_path(doc_path, force=force)
File “/home/user/frappe-bench/apps/frappe/frappe/modules/import_file.py”, line 54, in import_file_by_path
import_doc(doc, force=force, data_import=data_import, pre_process=pre_process)
File “/home/user/frappe-bench/apps/frappe/frappe/modules/import_file.py”, line 122, in import_doc
doc.insert()
File “/home/user/frappe-bench/apps/frappe/frappe/model/document.py”, line 229, in insert
d.db_insert()
File “/home/user/frappe-bench/apps/frappe/frappe/model/base_document.py”, line 289, in db_insert
), d.values())
File “/home/user/frappe-bench/apps/frappe/frappe/database.py”, line 137, in sql
self._cursor.execute(query, values)
File “/home/user/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/cursors.py”, line 205, in execute
self.errorhandler(self, exc, value)
File “/home/user/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/connections.py”, line 36, in defaulterrorhandler
raise errorclass, errorvalue
_mysql_exceptions.OperationalError: (1048, “Column ‘remember_last_selected_value’ cannot be null”)

solved here