question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ImportError: cannot import name 'add_data_to_monitor' from 'frappe.monitor' (apps/frappe/frappe/monitor.py)

See original GitHub issue

App Versions

{
	"erpnext": "14.2.0",
	"frappe": "14.8.0",
	"frappedesk": "0.4.0",
	"gameplan": "0.0.1",
	"hrms": "0.0.1",
	"india_compliance": "0.0.1",
	"insights": "0.1.0-beta",
	"payments": "0.0.1"
}

Route

List/Error Log/List

Trackeback

Traceback (most recent call last):
  File "apps/frappe/frappe/app.py", line 69, in application
    response = frappe.api.handle()
  File "apps/frappe/frappe/api.py", line 54, in handle
    return frappe.handler.handle()
  File "apps/frappe/frappe/handler.py", line 45, in handle
    data = execute_cmd(cmd)
  File "apps/frappe/frappe/handler.py", line 83, in execute_cmd
    return frappe.call(method, **frappe.form_dict)
  File "apps/frappe/frappe/__init__.py", line 1598, in call
    # if function has any **kwargs parameter that capture arbitrary keyword arguments
  File "apps/frappe/frappe/__init__.py", line 782, in wrapper_fn
    finally:
  File "apps/frappe/frappe/desk/reportview.py", line 29, in get
    data = compress(execute(**args), args=args)
  File "apps/frappe/frappe/desk/reportview.py", line 258, in compress
    from frappe.desk.query_report import add_total_row
  File "apps/frappe/frappe/desk/query_report.py", line 15, in <module>
    from frappe.monitor import add_data_to_monitor
ImportError: cannot import name 'add_data_to_monitor' from 'frappe.monitor' (apps/frappe/frappe/monitor.py)

Request Data

{
	"type": "POST",
	"args": {
		"doctype": "Error Log",
		"fields": "[\"`tabError Log`.`name`\",\"`tabError Log`.`owner`\",\"`tabError Log`.`creation`\",\"`tabError Log`.`modified`\",\"`tabError Log`.`modified_by`\",\"`tabError Log`.`_user_tags`\",\"`tabError Log`.`_comments`\",\"`tabError Log`.`_assign`\",\"`tabError Log`.`_liked_by`\",\"`tabError Log`.`docstatus`\",\"`tabError Log`.`idx`\",\"`tabError Log`.`reference_doctype`\",\"`tabError Log`.`method`\",\"`tabError Log`.`seen`\"]",
		"filters": "[]",
		"order_by": "`tabError Log`.`modified` desc",
		"start": 0,
		"page_length": 20,
		"view": "List",
		"group_by": "`tabError Log`.`name`",
		"with_comment_count": true
	},
	"freeze": false,
	"freeze_message": "Loading...",
	"headers": {},
	"error_handlers": {},
	"url": "/api/method/frappe.desk.reportview.get"
}

Response Data

{
	"exception": "ImportError: cannot import name 'add_data_to_monitor' from 'frappe.monitor' (apps/frappe/frappe/monitor.py)"
}

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
ankushcommented, Sep 29, 2022

@mohsinalimat your frappe version shows up as 14.8 this feature was in 14.9. It’s clearly not restarted properly.

0reactions
mohsinalimatcommented, Sep 29, 2022

Already do.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Frappe setup is giving this error ImportError: cannot ... - GitHub
Frappe setup is giving this error ImportError: cannot import name OpenIDConnectAuthCode in frappe/oauth.py #6749.
Read more >
Frappe Version 13.20.0 : New site and bench start error
I have seen several posts about it. Looks like a Frappe bug. Any other thoughts…? Site ImportError: cannot import name 'soft_unicode' from 'markupsafe'....
Read more >
ImportError: cannot import name - python - Stack Overflow
The problem is that you have a circular import: in app.py from mod_login import mod_login. in mod_login.py from app import app. This is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found