The DoNotebookRunner seems to run fine if we grab the globals() and locals() from the main Python file.
(For the dashboard, that is the xxx_index.py file)
Grabbing globals() and locals() somewhere within the call hierarchy, e.g. when creating the DoNotebookRunner does NOT seem to work!
We get weird errors around importing packages, e.g. that pd is unknown, although the import pandas as pd statement doesn't throw an error.
So the current work-around is to grab the globals/locals at the root level, but that is not very elegant.
(Note that the DoNotebookRunner.run adds the inputs, and an empty outputs to the locals.)
The DoNotebookRunner seems to run fine if we grab the
globals()
andlocals()
from the main Python file. (For the dashboard, that is thexxx_index.py
file)Grabbing
globals()
andlocals()
somewhere within the call hierarchy, e.g. when creating the DoNotebookRunner does NOT seem to work! We get weird errors around importing packages, e.g. thatpd
is unknown, although theimport pandas as pd
statement doesn't throw an error.So the current work-around is to grab the globals/locals at the root level, but that is not very elegant.
(Note that the DoNotebookRunner.run adds the
inputs
, and an emptyoutputs
to the locals.)