trungleduc / jupyter_app_launcher

A JupyterLab extension to create custom launcher entries.
https://jupyter-app-launcher.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
54 stars 11 forks source link

Second (and later) notebooks opened with jupyter-app-launcher connect to the same kernel. #66

Open mwcraig opened 1 month ago

mwcraig commented 1 month ago

There appears to be a bug in the launching of notebooks with jupyter app launcher. Detailed steps to reproduce are below, but in a nutshell, if I click a launcher button created by jupyter app launcher the notebook I expect opens and it behaves as I expect it to.

If I open a second notebook by clicking on a differnet launcher button that notebook opens but is connected to the kernel created for the first notebook I opened.

I've attached the files for a short example to demonstrate the problem, including a conda environment file to help in reproducing it. I couldn't attach so they are at https://github.com/mwcraig/jp-app-launch-bug-report

To reproduce:

  1. Put the files into the same directory, make an environment if you want, then launcher jupyter lab from that directory.
  2. Click on the launcher icon for "Notebook 1"
  3. Click on the launcher icon for "Notebook 2"
  4. Check the jupyter lab log in the terminal and you will see the second notebook has connected to the same kernel as the first one.
  5. In jupyter lab, run "Notebook 1" which just sets a variable x and prints it. It runs as expected.
  6. In jupyter lab, run "Notebook 2", whose only code is print(x). It prints the value of x set in "Notebook 1"

Also, thanks for this package -- I've found it really helpful!

trungleduc commented 1 month ago

Thanks for reporting the issue. I will take a look at it.