Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us at FabCon Vienna from September 15-18, 2025, for the ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM. Get registered
Hi, I am trying to run MS fabic notebook from data pipeline and get the exitValue which is required to perform next steps.
In my code I had to use python fintech library. When I am importing the fintech library after that notebookutils.notebook.exit() is not working.
Step1 :
Installed fintech library and checked that notebookutils.notebook.exit is working as expected
Step 2:
Once I import fintech after that getting exception : notebookutils.mssparkutils.handlers.notebookHandler.NotebookExit
Any Idea why this is happening? Any workaround how I can still get exit value
Complete Error Message:
Traceback (most recent call last): File "/tmp/ipykernel_12261/2317407240.py", line 1, in <module> notebookutils.notebook.exit({"error_count": error_count, "warning_count" : warning_count}) File "/home/trusted-service-user/cluster-env/clonedenv/lib/python3.11/site-packages/notebookutils/notebook.py", line 21, in exit nb.exit(value) File "/home/trusted-service-user/cluster-env/clonedenv/lib/python3.11/site-packages/notebookutils/mssparkutils/handlers/notebookHandler.py", line 102, in exit raise NotebookExit(value) notebookutils.mssparkutils.handlers.notebookHandler.NotebookExit: Output
Thanks in advance
Solved! Go to Solution.
Hi Arundhati_Sen1,
Thank you for your update.
As a workaround, kindly review the following steps that may assist in resolving the issue:
exit_value = {"status":"successful"}
notebookutils.notebook.exit(exit_value)
from fintech import register
Solved: Re: Python (not spark) Notebook exitValue issue - Microsoft Fabric Community
If you find our response helpful, kindly mark it as the accepted solution and provide kudos. This will assist other community members facing similar queries.
Thank you.
Hi Arundhati_Sen1,
We are following up to see if your query has been resolved. Should you have identified a solution, we kindly request you to share it with the community to assist others facing similar issues.
If our response was helpful, please mark it as the accepted solution and provide kudos, as this helps the broader community.
Thank you.
Hi Arundhati_Sen1,
We are following up to see if your query has been resolved. Should you have identified a solution, we kindly request you to share it with the community to assist others facing similar issues.
If our response was helpful, please mark it as the accepted solution and provide kudos, as this helps the broader community.
Thank you.
Hi Arundhati_Sen1,
We wanted to check in regarding your query, as we have not heard back from you. If you have resolved the issue, sharing the solution with the community would be greatly appreciated and could help others encountering similar challenges.
If you found our response useful, kindly mark it as the accepted solution and provide kudos to guide other members.
Thank you.
Hi Arundhati_Sen1,
Thank you for your update.
As a workaround, kindly review the following steps that may assist in resolving the issue:
exit_value = {"status":"successful"}
notebookutils.notebook.exit(exit_value)
from fintech import register
Solved: Re: Python (not spark) Notebook exitValue issue - Microsoft Fabric Community
If you find our response helpful, kindly mark it as the accepted solution and provide kudos. This will assist other community members facing similar queries.
Thank you.
Hi Arundhati_Sen1,
We have not received a response from you regarding the query and were following up to check if you have found a resolution. If you have identified a solution, we kindly request you to share it with the community, as it may be helpful to others facing a similar issue.
If you find the response helpful, please mark it as the accepted solution and provide kudos, as this will help other members with similar queries.
Thank you.
Below solution does not help me with notebookutils.notebook.exit() issue.
I need to import Fintech library for my solution.
Is there any alternative to notebookutils.notebook.exit() to get the response back to data pipeline?
Thankyou, @FabianSchut ,for your response.
Hi @Arundhati_Sen1,
We appreciate your inquiry on the Microsoft Fabric Community Forum.
The potential cause of this conflict could be the FinTech library, which might be overriding or modifying certain Python behaviors or modules on which notebookutils depends.
Kindly follow the steps mentioned below, which may help in resolving the issue:
1. Ensure that the version of the fintech library you are using is compatible with the current environment and notebookutils. Refer to the library’s documentation for any known issues.
2. If notebookutils.notebook.exit() is causing issues after importing the fintech library, consider using an alternative method to handle exits and return values. For example, instead of calling notebookutils.notebook.exit(), you may store the exit value in a variable and use it for further processing.
3. Implement try-except blocks around the code to handle exceptions gracefully, ensuring that the notebook generates an output even if an error occurs.
Additionally, please refer to the following link for further information:
NotebookUtils (former MSSparkUtils) for Fabric - Microsoft Fabric | Microsoft Learn
If you find our response helpful, kindly mark it as the accepted solution and provide kudos. This will assist other community members facing similar queries.
Thank you.
Hi,
You may try to import only required functions from the fintech package instead of the whole library. Like this example:
from fintech.sepa import Account, SEPACreditTransfer
It may be the case that fintech has some own exit function that interferes with your used function.
So try to remove the whole 'import fintech' line and only import specific packages used.
As per official document before importing anyt module from fintech library it needs to be registered (Python Fintech Documentation - joonis.de)
so I only imported register from fintech, not the entire library. But still issue persists. Any other workaround?
Even if I only import register from fintech still same thing happening. Please help
Does it work when you use
mssparkutils.notebook.exit()
instead of notebookutils?
No I have verified that also is not working, same error
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Fabric update to learn about new features.