嗨,我一直在尝试通过nbconvert api执行Jupyter笔记本,我希望澄清此代码段中的run_path
是什么?由于我的python脚本没有从笔记本收到任何错误
from nbconvert.preprocessors import CellExecutionError
try:
out = ep.preprocess(nb, {'metadata': {'path': run_path}})
except CellExecutionError:
out = None
msg = 'Error executing the notebook "%s".\n\n' % notebook_filename
msg += 'See notebook "%s" for the traceback.' % notebook_filename_out
print(msg)
raise
finally:
with open(notebook_filename_out, mode='wt') as f:
nbformat.write(nb, f)