Global name 'msgprint' is not defined

hi all
i get this error when i am trying to call a function from js file usinf

 Traceback (most recent call last):
  File "/home/frappe/frappe-bench/apps/frappe/frappe/", line 55, in application
    response = frappe.handler.handle()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/", line 19, in handle
  File "/home/frappe/frappe-bench/apps/frappe/frappe/", line 40, in execute_cmd
    ret =, **frappe.form_dict)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/", line 898, in call
    if "flags" in newargs:
  File "/home/frappe/frappe-bench/apps/sd_management/sd_management/sd_management/report/wells_report/", line 6, in updateworkflowstate
NameError: global name 'msgprint' is not defined

any help

Try frappe.msgprint("Message")

Hi @Sangram i already did it raise the same error besides i have already import frappe in the head of the doc i dont kkow whats the issue her.


Please paste your script here.

1 Like

check the images.

py file :

js file

thank you @Sangram

Why are you adding filters in msgprint? What is your use case?
Have you tried,

frappe.msgprint(filters, raise_exception=True)

i want to print it in a msgbox

yes i try it the same


use the frappe.msgprint() instead of just msgprint()

Hi @makarand_b
I already try it same error

frappe.msgprint(str(filters), raise_exception = True)

Hi @Ben_Cornwell_Mott
Same error