Bench stopped working suddenly


I am using frappe through production.ova in VM. It was working good. But when I created new script report, it stopped suddenly. So, I revert back everything in report, still it didn’t work. Something got disturbed. Restarted bench still same issue. Run command to restart mariadb service but no luck.

Finally, I took fresh .ova file again, started bench. It starts. Created new site. Till this, bench keeps running and even site loads and works. Then I get my app from github using “bench get-app [repo-url]”. But then it shows following error, and bench stops working. app ******
INFO:bench.utils:git clone***/****.git --depth 1 --origin upstream
Cloning into ‘‘…
Username for ‘’: xxxx
Password for ‘’:
remote: Enumerating objects: 69, done.
remote: Counting objects: 100% (69/69), done.
remote: Compressing objects: 100% (45/45), done.
remote: Total 69 (delta 22), reused 59 (delta 19), pack-reused 0
Unpacking objects: 100% (69/69), done.
Checking connectivity… done.
(‘installing’, u’
’) ****
INFO:bench.utils:./env/bin/pip install -q -e ./apps/****–no-cache-dir
Traceback (most recent call last):
File “/home/frappe/frappe-bench/env/lib/python3.5/site-packages/werkzeug/”, line 70, in getattr
KeyError: ‘session’

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/home/frappe/frappe-bench/env/lib/python3.5/site-packages/werkzeug/”, line 308, in _get_current_object
return getattr(self.__local,
File “/home/frappe/frappe-bench/env/lib/python3.5/site-packages/werkzeug/”, line 72, in getattr
raise AttributeError(name)
AttributeError: session

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/usr/lib/python3.5/”, line 184, in _run_module_as_main
main”, mod_spec)
File “/usr/lib/python3.5/”, line 85, in _run_code
exec(code, run_globals)
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/”, line 97, in
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/”, line 13, in main
commands = get_app_groups()
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/”, line 25, in get_app_groups
app_commands = get_app_commands(app)
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/”, line 63, in get_app_commands
if os.path.exists(frappe.get_app_path(app, ‘’))
File “/home/frappe/frappe-bench/apps/frappe/frappe/”, line 729, in get_app_path
return get_pymodule_path(app_name, *joins)
File “/home/frappe/frappe-bench/apps/frappe/frappe/”, line 744, in get_pymodule_path
return os.path.join(os.path.dirname(get_module(scrub(modulename)).file), *joins)
File “/home/frappe/frappe-bench/apps/frappe/frappe/”, line 706, in get_module
return importlib.import_module(modulename)
File “/home/frappe/frappe-bench/env/lib/python3.5/importlib/”, line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 986, in _gcd_import
File “”, line 969, in _find_and_load
File “”, line 958, in _find_and_load_unlocked
File “”, line 673, in _load_unlocked
File “”, line 665, in exec_module
File “”, line 222, in _call_with_frames_removed
File “/home/frappe/frappe-bench/apps/appname/appname/”, line 7, in
email = frappe.session.user
File “/home/frappe/frappe-bench/env/lib/python3.5/site-packages/werkzeug/”, line 347, in getattr
return getattr(self._get_current_object(), name)
File “/home/frappe/frappe-bench/env/lib/python3.5/site-packages/werkzeug/”, line 310, in _get_current_object
raise RuntimeError(‘no object bound to %s’ %
RuntimeError: no object bound to session

How to solve this?