Global name 'msgprint' is not defined

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

 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 19, in handle
    execute_cmd(cmd)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/handler.py", line 40, in execute_cmd
    ret = frappe.call(method, **frappe.form_dict)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 898, in call
    if "flags" in newargs:
  File "/home/frappe/frappe-bench/apps/sd_management/sd_management/sd_management/report/wells_report/wells_report.py", 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.

Regards

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

@SOLOSOFT,

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

Hi @makarand_b
I already try it same error

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

Hi @Ben_Cornwell_Mott
Same error