cbouy / mols2grid

Interactive molecule viewer for 2D structures

Home Page:https://mols2grid.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MolGrid.get_selection() always returns empty dict

prcurran opened this issue · comments

Hi cbouy,

Thanks for making this tool available - it's great!

I'm trying out the code (with jupyter notebook) and I've observed that after selecting a molecule entry in the mol2grid.MolGrid I am not able to retrieve the selection through mol2grid.MolGrid.get_selection() - an empty dict is returned irrespective of the selection. I have looked through your google colab examples too (RDkit UGM and solubility examples) and see the same behaviour so I think there's an issue within mol2grid.

Thanks in advance,
Pete

I just tried with the colab notebook on the main repository page (https://colab.research.google.com/github/cbouy/mols2grid/blob/master/demo.ipynb) and get_selection worked as it should.
image
Could you share your exact example code to test?

Hi @prcurran,

When you say jupyter notebook, is it the classical notebook displayed in your browser, displayed in VSCode (or another IDE), JupyterLab, or GoogleColab ? Because right now mols2grid.get_selection() only works for the classical notebook in a browser and Colab, so VScode and JupyterLab are expected to fail on this part. If this is not your case, could you open the JavaScript console on your browser and check for errors there ?

PS: thanks @fredrikw for checking

Closing this issue since no update from the author