Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

"New Mitosheet" button showing in unsupported kernels #1357

Open
smm9509 opened this issue Nov 6, 2024 · 1 comment
Open

"New Mitosheet" button showing in unsupported kernels #1357

smm9509 opened this issue Nov 6, 2024 · 1 comment

Comments

@smm9509
Copy link

smm9509 commented Nov 6, 2024

Describe the bug
When the kernel of a Jupyter Lab Notebook is set to something other than ipykernel (e.g. xeus-octave or qalc), the purple button "New Mitosheet" still shows, and clicking it adds a cell with code in the wrong syntax for the current kernel.
screenshot of bug

To Reproduce
Steps to reproduce the behavior:

  1. Get a non-python Jupyter kernel (e.g. Xeus Octave, or in my case I'm using my own Qalc Kernel not yet released)
  2. python -m mitosheet hello
  3. open or create a Jupyter Lab Notebook using the browser tab that opens
  4. in the northeast corner, click on "Python 3 (ipykernel)" and select a non-python kernel or a kernel that runs in a python environment without Mito
    image
  5. click the purple button "New Mitosheet"
  6. see the kernel throw errors as it attempts to process code in the wrong programming language. screenshot of bug

Please include the relevant dataset if the bug you encountered is dataset specific. Make sure to anonymize the data properly.

Expected behavior
The purple button "New Mitosheet" is hidden or grayed out when an unsupported Jupyter kernel is selected, and it does not cause problems in the current Notebook.

Screenshots
screenshot of bug

Desktop:

  • OS: Windows 11
  • Browser Firefox
  • Mito Version mitosheet 0.2.3

Additional context

@aarondr77
Copy link
Member

Hey @smm9509 thanks for pointing this out. I think we should be able to detect the type of kernel we're operating in and conditionally load this extension / display the button.

Let me take a look into this and see if there's a good fix.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants