MaelImhof / obsidian-jupyter

Edit .ipynb Jupyter files directly in Obsidian.
https://jupyter.mael.im/
12 stars 1 forks source link

Jupyter process crashed #54

Open koerbert opened 2 weeks ago

koerbert commented 2 weeks ago

Hello dear developer,

I can open a notebook from the shell (Win10) with nbopen C:\docs\python\notebooks\01-intro.ipynb, but when I import this notebook into obsidian and try to open it with your plugin, I always get the error that Jupyter crashed, with the last log message from Jupyter: 'TracebackException' object has no attribute 'cause'.

Do you know hwat I'm doing wrong? ONe weird thing that might have to so with the problem is that when I follow your instruchtion and do python -m nbopen.install_win, it says "You may need to restart for association with .ipynb files to work (pywin32 is needed to notify windows of change) I have restarted a few times, but to no avail.

Thanks, Timo

MaelImhof commented 2 weeks ago

Hi there Timo !

Sorry to hear that the plugin is not working for you. Could you please try the following steps and tell me if they work for you? This is to test that outside of Obsidian, Jupyter behaves as expected when used without nbopen.

  1. Open a Windows terminal
  2. cd into your Obsidian vault's root directory (there should be a .obsidian sub-folder there, for reference. Don't go inside the .obsidian folder but in the parent one)
  3. Run the command python -m notebook
  4. If no error occurs, a browser tab should open
  5. In the browser tab, search for the mentioned .ipynb file and open it
  6. Check that the file can be opened, run, edited and behaves correctly

Provided that everything above works, could you also do the following? This is for me to get a better idea of the problem from Jupyter's error log.

  1. Open your vault in Obsidian. Do not start Jupyter right away
  2. Go to Settings > Jupyter > Advanced (all the way down) and enable Print Jupyter output to Obsidian console
  3. Press Ctrl+Shift+I to open Obsidian console, check that the Obsidian developer console opens. Leave it as is for the time being
  4. Open the problematic .ipynb file the same way you did when you had the problem
  5. You should see several log messages appear in Obsidian console when Jupyter starts
  6. Copy those messages and paste them in this issue so that they can help me debug your Jupyter startup. Make sure no sensitive information are in the logs, such as absolute paths or other data you don't want published. If there are, remove the part you don't want to be published before pasting it here.

Thank you for your time and feedback, it helps make the plugin better and more resilient to different use cases. Please feel free to ask for any precision about the above steps.

Btw I'm Maël, nice to meet you !