MetricSign
EN|NLRequest Access
High severityfabric

Power BI Refresh Error:
NotebookExecutionFailed

What does this error mean?

A Microsoft Fabric notebook activity failed — due to a runtime error in the notebook code, Spark session termination, dependency issues, or resource exhaustion on the Fabric capacity.

Common causes

  • 1An unhandled Python or Spark exception in a notebook cell terminated the run
  • 2A library or package referenced in the notebook is not installed in the Fabric environment
  • 3The Spark session was terminated due to capacity pressure or an idle timeout before the notebook completed
  • 4A Delta table or Lakehouse path referenced in the notebook no longer exists or was moved
  • 5Insufficient compute capacity — the notebook was queued and eventually timed out waiting for a Spark session

How to fix it

  1. 1Open the failed notebook run in Fabric and review cell outputs and the Spark execution log for the specific error message.
  2. 2Add try/except blocks around error-prone cells and use mssparkutils.notebook.exit() to surface structured error messages.
  3. 3Verify that all libraries used in the notebook are installed in the attached Fabric environment definition.
  4. 4Check that all Delta tables and Lakehouse paths referenced in the notebook still exist and are accessible.
  5. 5If the failure is capacity-related, schedule the notebook during off-peak hours or upgrade the Fabric SKU.
  6. 6Increase the Spark session timeout in the notebook's session configuration if long-running computations are timing out.

Frequently asked questions

How do I see the actual error from a failed notebook cell?

In Fabric, open the notebook's run history from the workspace or pipeline activity. Each cell shows its output including error tracebacks. For Spark errors, also check the Spark UI linked from the run details.

Why does the notebook fail with 'session not found' even when it was running?

The Spark session times out during execution — common for notebooks with long idle periods between cells or during large shuffle operations. Increase the session timeout in the notebook's Spark session configuration.

Official documentation: microsoft-fabric

Other fabric errors