question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

using ``export_png`` or ``save`` without filename from within jupyter notebook saves png file to lib/python

See original GitHub issue

Using bokeh.io.export_png, bokeh.io.export_svg or bokeh.io.save from within a jupyter notebook without specifying an output filename causes the file to be written to lib/python (on my machine it’s ‘/Users/lcanavan/miniconda3/envs/bokeh/lib/python3.5/runpy.png’.

It’s likely due to how if there’s no filename arg, we infer the name of the script the document is in. A notebook is apparently executed by this runpy.py script in lib/python, so that’s the generated name.

Is there a consistent way to get the path of a jupyter notebook from inside the session?

Bokeh 0.12.7dev3

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
bryevdvcommented, Jun 29, 2017

Personally I am fine with making filenames required at all times.

0reactions
wqp89324commented, Nov 16, 2017

Anyway to specify the location where export_png saves the file? either a local location or on aws?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Figure PNG file exported from Jupyter Notebook is empty
I am trying to export a PNG file containing a figure using matplotlib.pyplot in Jupyter Notebook, but it is empty.
Read more >
Cell magic to save image output as a .png file - ipynb
It would be great if there was an easy option to save Jupyter cell output to .png files. Let's say I have: import...
Read more >
Save Plot as Image with Matplotlib - Stack Abuse
In this tutorial, we'll go over examples of how to save a plot as an image using Matplotlib. We'll also customize it by...
Read more >
Saving plots
Matplotlib plots can be saved as image files using the plt.savefig() function. ... building plots in a Jupyter notebook with %matplotlib inline enabled....
Read more >
How to Save a Plot to a File Using Matplotlib | Tutorial by Chartio
Matplotlib is capable of creating all manner of graphs, plots, charts, histograms, and much more. In most cases, matplotlib will simply output the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found