Error run_background for all background reports - Cloud based version

We have Report Stock Balance error. Today after 10:33 am EEST we can’t make report, they all have in the queue and the error - Prepared Report not found. We did not make any changes.
Thanks in advance for any help how to fix it!

{‘event’: None, ‘retry’: 0, ‘log’: <function log at 0x7fe60ed8e8c0>, ‘site’: u’crystallinegroup.erpnext.com’, ‘job_name’: u’<function run_background at 0x7f38016ca398>‘, ‘method_name’: u’run_background’, ‘method’: <function run_background at 0x7fe60ed53758>, ‘user’: u’crystalline.fin@gmail.com’, ‘kwargs’: {‘prepared_report’: u’REP00185’}, ‘is_async’: True}
Traceback (most recent call last):
File “/home/frappe/benches/bench-2019-04-22/apps/frappe/frappe/utils/background_jobs.py”, line 103, in execute_job
method(**kwargs)
File “/home/frappe/benches/bench-2019-04-22/apps/frappe/frappe/core/doctype/prepared_report/prepared_report.py”, line 36, in run_background
instance = frappe.get_doc(“Prepared Report”, prepared_report)
File “/home/frappe/benches/bench-2019-04-22/apps/frappe/frappe/init.py”, line 725, in get_doc
doc = frappe.model.document.get_doc(*args, **kwargs)
File “/home/frappe/benches/bench-2019-04-22/apps/frappe/frappe/model/document.py”, line 69, in get_doc
return controller(*args, **kwargs)
File “/home/frappe/benches/bench-2019-04-22/apps/frappe/frappe/model/document.py”, line 104, in init
self.load_from_db()
File “/home/frappe/benches/bench-2019-04-22/apps/frappe/frappe/model/document.py”, line 141, in load_from_db
frappe.throw((“{0} {1} not found”).format((self.doctype), self.name), frappe.DoesNotExistError)
File “/home/frappe/benches/bench-2019-04-22/apps/frappe/frappe/init.py”, line 352, in throw
msgprint(msg, raise_exception=exc, title=title, indicator=‘red’)
File “/home/frappe/benches/bench-2019-04-22/apps/frappe/frappe/init.py”, line 338, in msgprint
_raise_exception()
File “/home/frappe/benches/bench-2019-04-22/apps/frappe/frappe/init.py”, line 311, in _raise_exception
raise raise_exception(msg)
DoesNotExistError: Prepared Report REP00185 not found

1 Like

We still have this error and can’t use Stock Balance Report, which is very necessary for us to work.
The report worked several times within 10 days. Someone had similar problem? Any help?

Can you see an edit button on the menu when you open the report ?

If yes, click it and check Disable Prepared Report. It will work.

1 Like

First of all many thanks for your reply :slight_smile:
We use Cloud based version. When I try to check Disable Prepared Report and Save,
I get the message “Only administrator can create standard reports, please rename and save”.
Do you know what to do in this case?

Oh then I guess this might be out of my league. You should ping at support people at erpnext to ask what to do about this one. SInce this is a hack to circumvent around this problem.

A standard report can only be edited by the Administrator. Hence you log in as Administrator and repeat the same procedure.

I log in as owner of cloud account and have all rights.
I found this issue and i guess i can’t log in as Admin for such changes

We found that this problem with all run_background report.
I saved Stock Balance report as user report, checked Disable Prepared Report and still have run_background process and same error.

{‘event’: None, ‘retry’: 0, ‘log’: <function log at 0x7fd174391938>, ‘site’: u’crystallinegroup.erpnext.com’, ‘job_name’: u’<function run_background at 0x7fb9b9256320>‘, ‘method_name’: u’run_background’, ‘method’: <function run_background at 0x7fd174359758>, ‘user’: u’crystalline.fin@gmail.com’, ‘kwargs’: {‘prepared_report’: u’REP00228’}, ‘is_async’: True}
Traceback (most recent call last):
File “/home/frappe/benches/bench-2019-05-02/apps/frappe/frappe/utils/background_jobs.py”, line 103, in execute_job
method(**kwargs)
File “/home/frappe/benches/bench-2019-05-02/apps/frappe/frappe/core/doctype/prepared_report/prepared_report.py”, line 36, in run_background
instance = frappe.get_doc(“Prepared Report”, prepared_report)
File “/home/frappe/benches/bench-2019-05-02/apps/frappe/frappe/init.py”, line 725, in get_doc
doc = frappe.model.document.get_doc(*args, **kwargs)
File “/home/frappe/benches/bench-2019-05-02/apps/frappe/frappe/model/document.py”, line 69, in get_doc
return controller(*args, **kwargs)
File “/home/frappe/benches/bench-2019-05-02/apps/frappe/frappe/model/document.py”, line 104, in init
self.load_from_db()
File “/home/frappe/benches/bench-2019-05-02/apps/frappe/frappe/model/document.py”, line 141, in load_from_db
frappe.throw((“{0} {1} not found”).format((self.doctype), self.name), frappe.DoesNotExistError)
File “/home/frappe/benches/bench-2019-05-02/apps/frappe/frappe/init.py”, line 352, in throw
msgprint(msg, raise_exception=exc, title=title, indicator=‘red’)
File “/home/frappe/benches/bench-2019-05-02/apps/frappe/frappe/init.py”, line 338, in msgprint
_raise_exception()
File “/home/frappe/benches/bench-2019-05-02/apps/frappe/frappe/init.py”, line 311, in _raise_exception
raise raise_exception(msg)
DoesNotExistError: Prepared Report REP00228 not found