g2nb / igv-jupyter

Extension for Jupyter which integrates igv.js
MIT License
154 stars 13 forks source link

Error when running show() #28

Closed dakomura closed 5 years ago

dakomura commented 5 years ago

I installed igv-jupyter on conda virtual environment by running the following command and no error occurred.

conda create -n test python=3.7.1
conda activate test
conda install pip
conda install jupyter
pip install igv-jupyter

jupyter serverextension enable --py igv --sys-prefix
jupyter nbextension install --py igv --sys-prefix
jupyter nbextension enable --py igv --sys-prefix

But when I ran the following command on jupyter

import igv
b = igv.Browser({"genome": "hg19"})
b.show()

, jupyter diplayed nothing and I got the following error message in the background.

[IPKernelApp] ERROR | Exception in comm_msg for 943591948d6945bd80c5393589dba4dc
Traceback (most recent call last):
  File "/home/komura/.pyenv/versions/anaconda3-5.0.1/lib/python3.6/site-packages/ipykernel/comm/manager.py", line 111, in comm_msg
    comm.handle_msg(msg)
  File "/home/komura/.pyenv/versions/anaconda3-5.0.1/lib/python3.6/site-packages/ipykernel/comm/comm.py", line 159, in handle_msg
    self._msg_callback(msg)
  File "/home/komura/.pyenv/versions/anaconda3-5.0.1/lib/python3.6/site-packages/igv/browser.py", line 50, in _recv
    data = json.loads(msg['content']['data'])
  File "/home/komura/.pyenv/versions/anaconda3-5.0.1/lib/python3.6/json/__init__.py", line 348, in loads
    'not {!r}'.format(s.__class__.__name__))
TypeError: the JSON object must be str, bytes or bytearray, not 'dict'

What happened?

jrobinso commented 5 years ago

I don't know I can't reproduce that. To be clear you are running Jupyter Notebook correct, not Jupyter Lab? Could you share your notebook file?

dakomura commented 5 years ago

The problem was solved. What I did was to run jupyter serverextension disable --sys-prefix jupyter_nbextensions_configurator because the error similar to this occurred.

Thank you anyway.