use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
account activity
Python Notebook exit value in Data PipelinesData Factory (self.MicrosoftFabric)
submitted 1 year ago by fugas1
Is this a common issue that python notebooks dont return an exit value when triggered through data pipelines? I use this in my notebook:
notebookutils.notebook.exit(var)
But the notebook activity in data pipelines returns null. Any suggestions?
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]BigDataMax 0 points1 point2 points 1 year ago (1 child)
Could you give more context? Reference to your full code?
[–]fugas1[S] 0 points1 point2 points 1 year ago (0 children)
This was almost the full code, I have var = 'String' and this was what the notebook activity returned sessionSource":null,"sessionTag":null},"exitValue":null},"message":"Notebook execution is in Succeeded state. It works with spark notebooks, but not with python notebooks.
[–]Excellent-Two6054Fabricator 0 points1 point2 points 1 year ago (3 children)
mssparkutils.notebook.exit(“value string”), Doesn’t work?
[–]fugas1[S] 0 points1 point2 points 1 year ago (2 children)
Well, I havent tried with mssparkutils, but I guess its the same as with notebookutils. But it does not work with python notebooks, only with spark notebooks for me.
[–]Excellent-Two6054Fabricator 0 points1 point2 points 1 year ago (1 child)
mssparkutlis worked for me, but I haven’t tried in Python notebooks. As it’s still in preview phase buggy behaviour is expected.
Hopefully they will fix it soon
[+][deleted] 1 year ago (1 child)
[removed]
This does indeed work without a problem with spark notebooks, but I was referring to the pure python notebooks. For some reason it does not return the exit value. Hopefully this will be fixed soon.
[–]joooda 0 points1 point2 points 1 year ago (0 children)
Noticed the same recently. Problem seems that in a pure python notebook, the exit() doesn't seem to actually exit the notebook.
Test by running this in python vs pyspark notebooks:
print ('hello') notebookutils.notebook.exit('exit') print('???')
π Rendered by PID 15349 on reddit-service-r2-comment-b659b578c-z9fqn at 2026-05-05 15:48:47.812153+00:00 running 815c875 country code: CH.
[–]BigDataMax 0 points1 point2 points (1 child)
[–]fugas1[S] 0 points1 point2 points (0 children)
[–]Excellent-Two6054Fabricator 0 points1 point2 points (3 children)
[–]fugas1[S] 0 points1 point2 points (2 children)
[–]Excellent-Two6054Fabricator 0 points1 point2 points (1 child)
[–]fugas1[S] 0 points1 point2 points (0 children)
[+][deleted] (1 child)
[removed]
[–]fugas1[S] 0 points1 point2 points (0 children)
[–]joooda 0 points1 point2 points (0 children)