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