Comments (14)
probably you did not installed pyvista with the jupyter option (pip install "pyvista[jupyter]"
)
from pyvista.
Had the same issue with a conda install. Installing pyvista with conda install -c conda-forge pyvista jupyterlab ipywidgets trame
did not automatically add trame-vtk
as a dependency, and I was getting the same error as @YongcaiHuang.
After installing trame-vtk
and trame-vuetify
as suggested by @savindi-wijenayaka, I'm able to load the widgets in Jupyterlab.
from pyvista.
@jxfruit For me keeping the normal pyvista installation with additional packages trame-vtk
, trame-vuetify
and ipywidgets
fixed the issue. Had to restart the kernal though. However, I am using the VSCode to run the notebook.
from pyvista.
Finally, after use jupyter-server-proxy
and set export PYVISTA_TRAME_SERVER_PROXY_PREFIX='/proxy/'
, and make sure the jupyter-server-proxy extension plugin is enabled, we can see it by jupyter UI:nbextensions
module, which made my codes work.
Before this setting, it cannot work for the sake of my 2 different environments, which cannot be installed jupyter-server-proxy.
thanks again @jourdain @savindi-wijenayaka
from pyvista.
I got the similar problem, which shown in the following picture.
If I install trame-vtk and trame-vuetify, a new problem will be here:
my environment running with jupyter-notebook in docker container:
pip list| grep jupyter imjoy-jupyter-extension 0.3.0 jupyter-client 8.6.1 jupyter-core 5.7.2 jupyter-events 0.10.0 jupyter-server 2.13.0 jupyter-server-proxy 4.1.2 jupyter-server-terminals 0.5.3 jupyterlab-pygments 0.1.2 jupyterlab-widgets 3.0.10
pip list| grep trame trame 3.5.4 trame-client 2.16.5 trame-server 2.17.2 trame-vtk 2.8.5 trame-vuetify 2.4.3
pyvista 0.43.4
python:3.8.5 ubuntu18.04
from pyvista.
probably you did not installed pyvista with the jupyter option (
pip install "pyvista[jupyter]"
)
@jourdain
thanks for yoour reply. After installing with the jupyter option (pip install "pyvista[jupyter]"), I found the trame-vtk and trame-vuetify will be installed too. I would get the error
And I found some requests in F12 like "http://localhost:41349/index.html?ui=P_0x7f245835a970_0&reconnect=auto", a new port will be generated dynamically ? In container, the dynamic port cannot be forwarded to outside. Is there a solution? thks again
from pyvista.
You can install trame-jupyter-extension or leverage the jupyter proxy server.
from pyvista.
probably you did not installed pyvista with the jupyter option (
pip install "pyvista[jupyter]"
)
thanks for your comments! it works in JupyterLab browser. However, I found it cannot be shown on JupyterLab desktop. I am not sure if the problem is with the JupyterLab desktop.
Error handling request
Traceback (most recent call last):
File "[/opt/homebrew/anaconda3/envs/pip/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 350](http://localhost:56562/opt/homebrew/anaconda3/envs/pip/lib/python3.10/site-packages/aiohttp/web_protocol.py#line=349), in data_received
messages, upgraded, tail = self._request_parser.feed_data(data)
File "aiohttp[/_http_parser.pyx", line 557](http://localhost:56562/_http_parser.pyx#line=556), in aiohttp._http_parser.HttpParser.feed_data
File "aiohttp[/_http_parser.pyx", line 732](http://localhost:56562/_http_parser.pyx#line=731), in aiohttp._http_parser.cb_on_header_value
aiohttp.http_exceptions.LineTooLong: 400, message:
Got more than 8190 bytes (55572) when reading Header value is too long.
from pyvista.
Might be an issue with message size on the websocket. You can try to bump trame>=3.6
which should fix message size.
from pyvista.
Might be an issue with message size on the websocket. You can try to bump
trame>=3.6
which should fix message size.
Hi, I tried to upgrade the trame, but it still cannot be rendered.
env list
abirami-hide-code 4.0.5
aiohttp 3.9.5
aiosignal 1.3.1
anyio 4.3.0
appnope 0.1.4
argon2-cffi 23.1.0
argon2-cffi-bindings 21.2.0
arrow 1.3.0
asttokens 2.4.1
async-lru 2.0.4
async-timeout 4.0.3
attrs 23.2.0
Babel 2.14.0
beautifulsoup4 4.12.3
bleach 6.1.0
bqplot 0.12.43
certifi 2024.2.2
cffi 1.16.0
charset-normalizer 3.3.2
comm 0.2.2
contourpy 1.2.1
cycler 0.12.1
debugpy 1.8.1
decorator 5.1.1
defusedxml 0.7.1
exceptiongroup 1.2.1
executing 2.0.1
fastjsonschema 2.19.1
fonttools 4.51.0
fqdn 1.5.1
frozenlist 1.4.1
h11 0.14.0
httpcore 1.0.5
httpx 0.27.0
idna 3.7
imageio 2.34.1
ipydatawidgets 4.3.5
ipykernel 6.29.4
ipympl 0.9.4
ipython 8.24.0
ipython-genutils 0.2.0
ipyvolume 0.6.1
ipyvue 1.11.1
ipyvuetify 1.9.4
ipywebrtc 0.6.0
ipywidgets 8.1.2
isoduration 20.11.0
itables 2.0.1
jedi 0.19.1
Jinja2 3.1.3
joblib 1.4.2
json5 0.9.25
jsonpointer 2.4
jsonschema 4.22.0
jsonschema-specifications 2023.12.1
jupyter 1.0.0
jupyter_client 8.6.1
jupyter-console 6.6.3
jupyter_core 5.7.2
jupyter-events 0.10.0
jupyter-lsp 2.2.5
jupyter_server 2.14.0
jupyter_server_proxy 4.1.2
jupyter_server_terminals 0.5.3
jupyterlab 4.1.8
jupyterlab-execute-time 3.1.2
jupyterlab-lsp 5.1.0
jupyterlab_pygments 0.3.0
jupyterlab_server 2.27.1
jupyterlab_widgets 3.0.10
jupytext 1.16.1
kiwisolver 1.4.5
lazy_loader 0.4
lckr_jupyterlab_variableinspector 3.2.1
markdown-it-py 3.0.0
MarkupSafe 2.1.5
matplotlib 3.8.4
matplotlib-inline 0.1.7
mdit-py-plugins 0.4.0
mdurl 0.1.2
mistune 3.0.2
more-itertools 10.2.0
msgpack 1.0.8
multidict 6.0.5
nbclient 0.10.0
nbconvert 7.16.4
nbformat 5.10.4
nest-asyncio 1.6.0
networkx 3.3
notebook 7.1.3
notebook_shim 0.2.4
numpy 1.26.4
overrides 7.7.0
packaging 24.0
pandas 2.2.2
pandas-flavor 0.6.0
pandocfilters 1.5.1
parso 0.8.4
patsy 0.5.6
pexpect 4.9.0
pillow 10.3.0
pingouin 0.5.4
pip 24.0
platformdirs 4.2.1
plotly 5.22.0
pooch 1.8.1
prometheus_client 0.20.0
prompt-toolkit 3.0.43
psutil 5.9.8
ptyprocess 0.7.0
pure-eval 0.2.2
pycparser 2.22
Pygments 2.17.2
pyparsing 3.1.2
PySide6 6.7.0
PySide6_Addons 6.7.0
PySide6_Essentials 6.7.0
python-dateutil 2.9.0.post0
python-json-logger 2.0.7
pythreejs 2.4.2
pytz 2024.1
pyvista 0.43.6
PyYAML 6.0.1
pyzmq 26.0.3
qtconsole 5.5.1
QtPy 2.4.1
referencing 0.35.1
requests 2.31.0
rfc3339-validator 0.1.4
rfc3986-validator 0.1.1
rpds-py 0.18.0
scikit-image 0.23.2
scikit-learn 1.4.2
scipy 1.13.0
scooby 0.9.2
seaborn 0.13.2
Send2Trash 1.8.3
setuptools 69.5.1
shiboken6 6.7.0
simpervisor 1.0.0
SimpleITK 2.3.1
six 1.16.0
sniffio 1.3.1
soupsieve 2.5
stack-data 0.6.3
statsmodels 0.14.2
tabulate 0.9.0
tenacity 8.2.3
terminado 0.18.1
threadpoolctl 3.5.0
tifffile 2024.4.24
tinycss2 1.3.0
toml 0.10.2
tomli 2.0.1
tornado 6.4
traitlets 5.14.3
traittypes 0.2.1
trame 3.6.0
trame-client 3.0.2
trame-server 3.0.0
trame-vtk 2.8.7
trame-vuetify 2.4.3
types-python-dateutil 2.9.0.20240316
typing_extensions 4.11.0
tzdata 2024.1
uri-template 1.3.0
urllib3 2.2.1
vtk 9.3.0
wcwidth 0.2.13
webcolors 1.13
webencodings 0.5.1
websocket-client 1.8.0
wheel 0.43.0
widgetsnbextension 4.0.10
wslink 2.0.2
xarray 2024.3.0
yarl 1.9.4
from pyvista.
Thanks for trying, I guess I'm not sure where that issue with JupyterLab desktop is coming from.
from pyvista.
@jxfruit For me keeping the normal pyvista installation with additional packages
trame-vtk
,trame-vuetify
andipywidgets
fixed the issue. Had to restart the kernal though. However, I am using the VSCode to run the notebook.
It works in local environment. However, I use it in k8s container, a specific port is necessary.
from pyvista.
You can install trame-jupyter-extension or leverage the jupyter proxy server.
it looks like that does not work in Jupyter notebook. It get the same error
from pyvista.
When you are dealing with remote services, the default setting is not enough. Either you need to use jupyter-server-proxy
or trame-jupyter-extension
. With jupyter-server-proxy
when not used within JupyterHub (which setup some ENV variable) you will need to set os.environ["TRAME_IFRAME_BUILDER"] = "serverproxy"
.
from pyvista.
Related Issues (20)
- Changing focal point of plotter when pressing 'f' doesnt work when plotting UnstructuredGrid and editting it.
- Backface rendering parameters not working in interactive plots HOT 4
- Mesh duplication
- OSError when import pyvista HOT 5
- how to stabilize rotation during interaction?
- Parallel projection spoils plot
- Error reading large VTK XLM-files ( e.g. vtu-files) HOT 3
- Crinkle Clip returns UnstructuredGrid instead of PolyData HOT 6
- `extract_points` and `extract_cells` modify input data arrays
- `PolyData` initializes verts as faces and does not raise error (and may crash Python) HOT 7
- Bug with non-default center and direction for capsule with VTK<9.3
- `cast_to_unstructured_grid` not working for `PointSet`
- Inconsistent rendering of ChartMPL plots HOT 2
- Plotting in Jupyter returns AttributeError: 'NoneType' object has no attribute 'has_capabilities' HOT 7
- Fix failing doc image tests HOT 3
- Need to fix warning of `tests/core/test_dataset_filters.py` HOT 2
- Error loading mesh while using Pyvista with vtk-egl HOT 4
- Point labels do not show properly in interactive documentation. HOT 3
- Opaque regions in RGBA images render partially transparent no matter what HOT 11
- UnstructuredGrid.clean modifies cell faces in-place HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyvista.