Closed protw closed 1 year ago
Hi,
Thanks for using the app! I've had a quick look and have traced through the above error message and code. In order for jupyter_to_medium to upload your notebook to medium it needs to:
It seems like it is failing on the first hurdle - identifying where the .ipynb file sits so it can convert it to .md etc etc. From looking through the code this is done by the line:
return nbformat.read(self.filename, as_version=4)
in the get_notebook
method where the filename
attribute is passed down by the bundler - the bit that connects this python code to the jupyter notebook
instance. All in all I have no idea why the bundler is passing down the wrong file location and will struggle to replicate, however the fact that it works when running from the command line is re-assuring as that means the issue does appear to be the bundler.
I also run this within virtual environments (either venv or conda envs) and it works no problem. Are you running your instance of Jupyter inside your venv?
Thanks for your time and efforts. It seems I found the reason - as I told before for my apps I modified configuration code C:\Users\my_user_name\.jupyter\jupyter_notebooke_config.py
uncommenting two lines as follow:
c.NotebookApp.notebook_dir = r"D:\boa_uniteam\DOCSIFY"
c.ContentsManager.root_dir = r"D:\boa_uniteam\DOCSIFY"
In this way I established another than default working directory, which is more convenient for me.
After I've commented these lines again and moved my ipynb file to the default directory C:\Users\my_user_name\
your application started working immediately.
It's great. Thanks. Though I would prefer working in an arbitrary directory where my ipynb files originally located.
However, there is another part of the story. Even after having started working your apps does not render my diagrams. I suspect though am not sure that's because I use holoviz
graphics package. My code is straightforward and you could see it at https://github.com/protw/airscape/blob/master/stavok/interact_data_demo.ipynb
Hey,
Sorry for the year long delay on this - yep that is probably the issue. Each new visualisation package requires integration in order to screenshot the image for Medium upload as PNG.
Going to close this issue for now - holoviz isn't a widely used package (compared to e.g.matplotlib) so it's not worth the effort of integrating. Although if you'd like to make a PR that would be amazing!
Mark
Thanks for quite useful apps.
My OS - Windows 10. For my apps I use virtual environment named
airscape
. Also I modifiedjupyter_notebooke_config.py
:When I launch the apps from a note book I obtain the following error:
After that I tried the command line launch from my own working directory. Surprisingly, but it worked, though without saving images in the draft. Probably it worthwhile to mention that in this notebook I use for vizualization
Holoviz
withBokeh
beckend.