I have a notebook that re-formats results from an exploratory analysis notebook for exporting to slides. This notebook creates new cells based on how many "part types" and "parameters" are passed in. I used the following code to generate a new cell and it works when I tested in the notebook:
def create_code_cell(cell_content, replace=False,):
shell = get_ipython()
payload = {
"source":"set_next_input",
"text":cell_content,
"replace":replace,
}
shell.payload_manager.write_payload(payload, single=False)
The problem I'm running into is that this function is not creating the cells when I execute with Papermill.
If I open the new notebook that is created from Papermill and click Cells=>Run All the cells are generated.
Thank you for your help!