Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Volshow and Scatter plot issues #441

Open
VedranTunukovic opened this issue Aug 8, 2023 · 5 comments
Open

Volshow and Scatter plot issues #441

VedranTunukovic opened this issue Aug 8, 2023 · 5 comments
Labels

Comments

@VedranTunukovic
Copy link

Hi everyone,

Version 0.6.3. seemingly stopped working after last Chrome update; Volshow and scatter plots generate empty plots. Some examples are:

  1. Scatter plot on the documentation website generates x / y / z axes with maximum size of 1:
    image

  2. Volshow on the documentation website generates an empty plot:
    image

  3. Surfaces produce some wonky results, again axes being constrained between 0 and 1.
    image

These fail to work on custom data too. So far I have tried downgrading to version 0.6.0., and opening the plots with Firefox, Opera, Edge, and Chrome. Is this happening for anyone else?

Thank you in advance for your help

@LinusP217
Copy link

LinusP217 commented Aug 28, 2023

This is happening for me as well. It seems regardless of the data, the x,y,z axes are limited to [0,1] range.

image

@oliverdrozdowski
Copy link

Hi,

is there a workaround? I have tried without success to install a combination of packages such that one can use the scatter plot again. I have an old environment with 0.6.0a8 and notebook 6 lying around that does work (with all new browsers I have installed), so I do not believe that it is a chrome issue, as suggested in the original bug report.

I think it is a compatbility issue with newer versions of ipython, jupyter or something similar. Also jupyter does not include ipython_genutils anymore, which is required by ipyvolume but apparently not in the requirements because it is not installed in the standard conda install.

In fact, I have tried to use an older version of ipyvolume (even going back to 0.6.0a8 and notebook 6) and have not found a combination of packages which fixes the bug.
Right now I have found no way that I can install ipyvolume in a new conda environment from scratch without this bug occuring. This is also true for firefox by the way. It also cannot be fixed by setting the xlim etc.

@lyhyl
Copy link

lyhyl commented Dec 8, 2023

The same issue in vscode.
image

@zagerpatrick
Copy link

Hey, has anyone managed to find a work around? I'm a new user trying to get started but have been unable to get a functional installation going for using volshow (I've even tried going back to 0.5.X versions but can't get jupyterlab to agree). Would be great to get an update on this, as to my understanding this error make the package unusable.

@franciscomcm
Copy link

I am facing the same issue. After experimenting with package versions starting from an old configuration that worked for me, I found a setup where several examples in the docs could be plotted (with the correct ranges in the axes):

Package                   Version
------------------------- ---------------
anyio                     3.7.1
argon2-cffi               23.1.0
argon2-cffi-bindings      21.2.0
arrow                     1.3.0
asttokens                 2.2.1
async-lru                 2.0.4
attrs                     23.1.0
Babel                     2.13.0
backcall                  0.2.0
beautifulsoup4            4.12.2
bleach                    6.1.0
bqplot                    0.12.36
certifi                   2023.7.22
cffi                      1.16.0
charset-normalizer        3.3.2
comm                      0.1.4
contourpy                 1.2.0
cycler                    0.12.1
debugpy                   1.8.0
decorator                 5.1.1
defusedxml                0.7.1
executing                 2.0.1
fastjsonschema            2.19.1
fonttools                 4.47.2
fqdn                      1.5.1
idna                      3.4
ipydatawidgets            4.3.2
ipykernel                 6.25.1
ipython                   8.8.0
ipython-genutils          0.2.0
ipyvolume                 0.6.0a10
ipyvue                    1.7.0
ipyvuetify                1.8.2
ipywebrtc                 0.6.0
ipywidgets                7.8.1
isoduration               20.11.0
jedi                      0.19.1
Jinja2                    3.1.3
json5                     0.9.14
jsonpointer               2.4
jsonschema                4.21.1
jsonschema-specifications 2023.12.1
jupyter_client            8.3.0
jupyter_core              5.3.1
jupyter-events            0.8.0
jupyter-lsp               2.2.0
jupyter_server            2.8.0
jupyter_server_terminals  0.4.4
jupyterlab                4.0.7
jupyterlab-pygments       0.2.2
jupyterlab_server         2.25.0
jupyterlab-widgets        1.1.7
kiwisolver                1.4.5
MarkupSafe                2.1.5
matplotlib                3.7.2
matplotlib-inline         0.1.6
mistune                   3.0.2
nbclient                  0.8.0
nbconvert                 7.9.2
nbformat                  5.9.2
nest-asyncio              1.5.7
notebook                  6.4.13
notebook_shim             0.2.3
numpy                     1.25.2
overrides                 7.4.0
packaging                 23.2
pandas                    1.5.3
pandocfilters             1.5.1
parso                     0.8.3
pexpect                   4.9.0
pickleshare               0.7.5
pillow                    10.2.0
pip                       24.0
platformdirs              4.2.0
prometheus-client         0.17.1
prompt-toolkit            3.0.24
psutil                    5.9.8
ptyprocess                0.7.0
pure-eval                 0.2.2
pycparser                 2.21
Pygments                  2.17.2
pyparsing                 3.0.9
python-dateutil           2.8.2
python-json-logger        2.0.7
pythreejs                 2.4.2
pytz                      2023.3
PyYAML                    6.0.1
pyzmq                     25.1.2
referencing               0.33.0
requests                  2.31.0
rfc3339-validator         0.1.4
rfc3986-validator         0.1.1
rpds-py                   0.9.2
Send2Trash                1.8.2
setuptools                62.6.0
six                       1.16.0
sniffio                   1.3.0
soupsieve                 2.5
stack-data                0.6.3
terminado                 0.17.1
tinycss2                  1.2.1
tornado                   6.3.2
traitlets                 5.6.0
traittypes                0.2.1
types-python-dateutil     2.8.19.20240106
tzdata                    2023.4
uri-template              1.3.0
urllib3                   2.2.0
wcwidth                   0.2.6
webcolors                 1.13
webencodings              0.5.1
websocket-client          1.6.4
widgetsnbextension        3.6.6

Still, the opacity controls on the right "Misc" menu are not showing.

image

Instead there is an error

[Open Browser Console for more detailed log - Double click to close this message]
Failed to load model class 'VBoxModel' from module '@jupyter-widgets/controls'

And when checking the browser console there are several lines like the following:

The resource at “https://choices.truste.com/ca?pid=adexpose01&aid=accordant01&cid=0711acc300x250&c=accordant01cont5&w=300&h=250&plc=br”
was blocked by OpaqueResponseBlocking. Reason: “after sniff: status code is not in allowed range”.

The same error shows for different URLs, but always with the same reason.

Finally, the RuntimeWarning (invalid value encountered in cast), which I have seen in other cases seems to be related to the presence of NaNs in the gradient array. Adding something like gradient[i][zindex][~np.isfinite(gradient[i][zindex])] = 0 (same operation as in line 89 of the script) before Line 102 in serialize.py seemed to fix it.

If anyone has any ideas for further debugging, I would be happy to help. I am not sure where to look next, but I am very interested in restoring the functionality of ipyvolume.

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

No branches or pull requests

7 participants