Hello,
I have a Virtual Machine with bench / frappe installed. I am using VSCode with the Extension “Remote SSH” to connect to the Virtual Machine. There I installed a custom app and now I am trying to debug a python file.
I have followed this guide
and debugging starts.
But:
Within the python file I am debugging I use frappe.get_doc(“MyDoctype”, “thename”) and when trying to run this I get the Exception: “no object bound to db”
Exception has occurred: RuntimeError
no object bound to db
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/base_document.py”, line 38, in get_controller
module_name, custom = frappe.db.get_value(“DocType”, doctype, (“module”, “custom”), cache=True)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 69, in get_doc
controller = get_controller(doctype)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 762, in get_doc
doc = frappe.model.document.get_doc(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/ice/ice/api.py”, line 64, in sync_calendar
md = frappe.get_doc(“MyDoctype”, “thename”)
File “/home/frappe/frappe-bench/apps/ice/ice/api.py”, line 581, in
message = my_function(data)
I have searched all answers in this forum with no result, can somebody give me a hint?