Script Report always shows “Nothing to show” – tried everything (ERPNext 15.45.2 / Frappe 15.49.1)

Hi everyone,

I’m having a persistent issue with Script Reports on my ERPNext instance (ERPNext 15.45.2, Frappe 15.49.1, HRMS 15.35.3, self-hosted on Ubuntu).

Problem:
No matter what I do, any Script Report I create (even the simplest possible, with just one column and one row) always displays “Nothing to show” or “Generic Empty State”.
Query Reports work fine and show data from the database.

What I’ve tried so far:

  • Checked all permissions (Administrator user, all necessary permissions on Report, Item, User, etc.)
  • Made sure the report is not “Disabled”
  • Tried different DocTypes (Item, User, Employee)
  • Used the simplest possible script:

def execute(filters=None):

columns = [{“label”: “Test”, “fieldname”: “test”, “fieldtype”: “Data”}]

data = [{“test”: “It works!”}]

return columns, data

  • Tried with and without filters, with and without “Is Standard”, in multiple browsers and with different users
  • Ran bench clear-cache, bench restart, bench --site site1.local migrate
  • Checked the Error Log in ERPNext and in the terminal – no errors related to reports
  • In bench console, frappe.get_all("Item", fields=["item_code", "item_name"]) returns data
  • Query Reports with SQL queries work and display data
  • Created a brand new Script Report, no filters, just one column and one value – still nothing shows

Additional info:

  • No customizations on the Report DocType
  • No custom scripts that could affect reports
  • Tried incognito mode and a different computer

I have tried both official examples from the documentation, community forum scripts, and even some suggestions from AI assistants. Regardless of the source, even the simplest “hello world” Script Report always returns “Nothing to show”.

Question:
Has anyone experienced this before?
Is there anything else I can check or try before setting up a new instance or restoring from backup?

Any help or suggestions would be greatly appreciated!

Thanks in advance!

I think you are creating the script report from UI, not in the backend. If from UI it must be like this
columns = [{“label”: “Customer”,}]
data = [{‘customer’: ‘test’},]
data = columns, data

Hi, just wanted to point everyone to a non-standard script report that works (see below). It seems there is no need to return anything.

This could be related to an issue that I have as well where frappe is editing/referring to the code in your /env/lib/python/site-packages folder. I described the issue here Script Report not creating Boilerplate in correct directory

It happens when your module is not installed as an editable python package. To fix define a pyproject.toml file with the same build-system as the one in frappe/erpnext. Then check the /env/lib/python/site-packages defines a .pth file for your module