After restart VPS nothing will open now

Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/utils.py”, line 184, in load_doctype_module
doctype_python_modules[key] = frappe.get_module(module_name)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 783, in get_module
“”“Rename a document. Calls frappe.model.rename_doc.rename_doc”“”
File “/home/frappe/frappe-bench/env/lib/python3.5/importlib/init.py”, 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/erpnext/erpnext/accounts/doctype/payment_entry/payment_entry.py”, line 10, in
from erpnext.accounts.party import get_party_account
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/accounts/party.py”, line 8, in
from frappe.core.doctype.user_permission.user_permission import get_permitted_documents
ImportError: cannot import name ‘get_permitted_documents’

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/app.py”, line 55, in application
response = frappe.handler.handle()
File “/home/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 20, in handle
data = execute_cmd(cmd)
File “/home/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 55, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 1007, in call
“”“Call a function and match arguments.”“”
File “/home/frappe/frappe-bench/apps/frappe/frappe/desk/form/load.py”, line 71, in getdoctype
docs = get_meta_bundle(doctype)
File “/home/frappe/frappe-bench/apps/frappe/frappe/desk/form/load.py”, line 81, in get_meta_bundle
bundle = [frappe.desk.form.meta.get_meta(doctype)]
File “/home/frappe/frappe-bench/apps/frappe/frappe/desk/form/meta.py”, line 26, in get_meta
meta = FormMeta(doctype)
File “/home/frappe/frappe-bench/apps/frappe/frappe/desk/form/meta.py”, line 39, in init
self.load_assets()
File “/home/frappe/frappe-bench/apps/frappe/frappe/desk/form/meta.py”, line 53, in load_assets
self.load_templates()
File “/home/frappe/frappe-bench/apps/frappe/frappe/desk/form/meta.py”, line 174, in load_templates
module = load_doctype_module(self.name)
File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/utils.py”, line 186, in load_doctype_module
raise ImportError(‘Module import failed for {0} ({1})’.format(doctype, module_name + ’ Error: ’ + str(e)))
ImportError: Module import failed for Payment Entry (erpnext.accounts.doctype.payment_entry.payment_entry Error: cannot import name ‘get_permitted_documents’)

Run below statement:
sudo journalctl -xe | grep apt-daily
If you see log entries having apt-daily keyword, your OS is most probably set to auto-update.
I don’t know how but it breaks some wiring in frappe environment.
To fix it, just run below command. It will overwrite nginx and supervisor config files so back it up if you did manual changes to these files.
sudo bench setup production frappe

If apt-daily was indeed the cause of issue, you may also consider disabling apt-daily jobs to avoid the hassle.