mpastell / Pweave

Pweave is a scientific report generator and a literate programming tool for Python. It can capture the results and plots from data analysis and works well with numpy, scipy and matplotlib.
http://mpastell.com/pweave
Other
435 stars 64 forks source link

Fixed handling of non-executed cells in jupyter notebooks #123

Open AndyLamperski opened 6 years ago

AndyLamperski commented 6 years ago

When writing to a Jupyter notebook, if a code cell had the option 'execute=False', I would get the following error:

Failed validating 'type' in code_cell['properties']['outputs']:                                                  

On instance['cells'][1]['outputs']:
''

This was fixed by changing the result from '' to []. Also, the execution count for non-executed cells was set to None.

I haven't tested if this causes undesirable behavior for other output formats.