ansys / pyfluent-visualization

Visualize Ansys Fluent simulations using Python
https://visualization.fluent.docs.pyansys.com
MIT License
28 stars 3 forks source link

Error displaying images in Jupyter Notebook with Trame package #243

Open lbj-007 opened 1 year ago

lbj-007 commented 1 year ago

I'm using jupyter notebook to replicate the reference example . When I need to display some images, it gives me the error:

E:\python-3.11.3\Lib\site-packages\pyvista\jupyter\notebook.py:58: UserWarning: Failed to use notebook backend: 
No module named '[trame.app](https://trame.app/)'
Falling back to a static output.
 warnings.warn(

but the images are displayed properly.
Snipaste_2023-04-10_10-19-33 However, it doesn't display any images and shows "localhost refused to connect" after I installed the trame package. I am not sure if it is the trame package that is incompatible with PyVista or other packages.

lbj-007 commented 1 year ago

BTW, the contour is displayed normally, but the 2D XY chart cannot be displayed properly. I don't know the reason. Snipaste_2023-04-10_12-10-59

seanpearsonuk commented 1 year ago

@ajain-work could you advise @lbj-007 ? Thanks

ajain-work commented 1 year ago

@lbj-007 Please add%matplotlib notebook in the beginning of notebook.

lbj-007 commented 1 year ago

%matplotlib notebook

Hi,still doesn't work.

seanpearsonuk commented 1 year ago

@ajain-work regarding the trame error, perhaps the user needs to install that package? Does it not get installed with pfluent-visualization?

ajain-work commented 1 year ago

@seanpearsonuk No it does not get installed with pyfluent-visualization as it is required only while running script in JNB.

ajain-work commented 1 year ago

%matplotlib notebook

Hi,still doesn't work.

@lbj-007 Do you see any error?

lbj-007 commented 1 year ago

%matplotlib notebook

Hi,still doesn't work.

@lbj-007 Do you see any error?

There's a warning which does not show before with the 2D XY chart, and the contour still shows the same error, but the images are displayed properly.

E:\python-3.11.3\Lib\site-packages\pyvista\jupyter\notebook.py:58: UserWarning: Failed to use notebook backend: 

No module named 'trame.app'

Falling back to a static output.
  warnings.warn(

image

velpulagopiraju commented 4 months ago

Anyone found solution for this. also getting same error..

velpulagopiraju commented 4 months ago

@seanpearsonuk @lbj-007 @ajain-work

seanpearsonuk commented 4 months ago

@ajain-work Is there any further assistance we can provide on this matter? Thanks.

I believe that your previous guidance above (using %matplotlib notebook) is effective.

velpulagopiraju commented 4 months ago

still it doesn't work ..(by using %matplotlib notebook) it throughs below error.

7

ajain-work commented 4 months ago

@seanpearsonuk I shall take a look. Thanks

prmukherj commented 4 months ago

We need to install the following packages: trame-vtk , trame-vuetify and ipywidgets along with trame for rendering in notebook. https://github.com/pyvista/pyvista/issues/5848#issuecomment-2097245444

@lbj-007, could you please check. Thank you

velpulagopiraju commented 4 months ago

Hi @prmukherj thank you for your response, in my case Installed all the packages mentioned above still there is no results..

also i observe that if i use "%matplotlib inline" getting empty XY-chart. 9

if i use "%matplotlib notebook" getting Javascript Eroor: IPython is not defined. 10

installed packages list.

Package Version


about-time 4.2.1 aiohttp 3.9.5 aiosignal 1.3.1 alabaster 0.7.16 alive-progress 3.1.5 ansys-api-fluent 0.3.25 ansys-api-platform-instancemanagement 1.1.0 ansys-api-tools-filetransfer 0.1.0 ansys-dynamicreporting-core 0.6.0 ansys-fluent-core 0.21.0 ansys-fluent-parametric 0.11.dev0 ansys-fluent-visualization 0.10.0 ansys-platform-instancemanagement 1.1.2 ansys-tools-filetransfer 0.1.0 ansys-units 0.3.2 anyio 4.4.0 argon2-cffi 23.1.0 argon2-cffi-bindings 21.2.0 arrow 1.3.0 asgiref 3.8.1 astroid 3.2.3 asttokens 2.4.1 async-lru 2.0.4 atomicwrites 1.4.1 attrs 23.2.0 autopep8 2.0.4 Babel 2.15.0 backports.tarfile 1.2.0 bcrypt 4.1.3 beartype 0.17.2 beautifulsoup4 4.12.3 binaryornot 0.4.4 black 24.4.2 bleach 6.1.0 blinker 1.8.2 build 1.2.1 certifi 2024.7.4 cffi 1.16.0 chardet 5.2.0 charset-normalizer 3.3.2 click 8.1.7 cloudpickle 3.0.0 cmocean 4.0.3 colorama 0.4.6 colorcet 3.1.0 comm 0.2.2 contourpy 1.2.1 cookiecutter 2.6.0 cryptography 42.0.8 cycler 0.12.1 dash 2.17.1 dash-bootstrap-components 1.6.0 dash-core-components 2.0.0 dash-html-components 2.0.0 dash-table 5.0.0 debugpy 1.8.2 decorator 5.1.1 defusedxml 0.7.1 diff-match-patch 20230430 dill 0.3.8 Django 5.0.7 docker 6.1.3 docstring-to-markdown 0.15 docutils 0.21.2 executing 2.0.1 fastjsonschema 2.20.0 filelock 3.15.4 flake8 7.0.0 Flask 3.0.3 fonttools 4.53.0 fqdn 1.5.1 frozenlist 1.4.1 grapheme 0.6.0 grpcio 1.64.1 grpcio-health-checking 1.62.2 h11 0.14.0 h5py 3.11.0 httpcore 1.0.5 httpx 0.27.0 idna 3.7 imageio 2.34.2 imagesize 1.4.1 importlib_metadata 8.0.0 inflection 0.5.1 intervaltree 3.1.0 ipykernel 6.29.5 ipython 8.26.0 ipywidgets 8.1.3 isoduration 20.11.0 isort 5.13.2 itsdangerous 2.2.0 jaraco.classes 3.4.0 jaraco.context 5.3.0 jaraco.functools 4.0.1 jedi 0.19.1 jellyfish 1.0.4 Jinja2 3.1.4 joblib 1.4.2 json5 0.9.25 jsonpointer 3.0.0 jsonschema 4.22.0 jsonschema-specifications 2023.12.1 jupyter_client 8.6.2 jupyter_core 5.7.2 jupyter-events 0.10.0 jupyter-lsp 2.2.5 jupyter_server 2.14.1 jupyter_server_proxy 4.3.0 jupyter_server_terminals 0.5.3 jupyterlab 4.2.3 jupyterlab_pygments 0.3.0 jupyterlab_server 2.27.2 jupyterlab_widgets 3.0.11 keyring 25.2.1 kiwisolver 1.4.5 lxml 4.9.4 markdown-it-py 3.0.0 MarkupSafe 2.1.5 matplotlib 3.9.1 matplotlib-inline 0.1.7 mccabe 0.7.0 mdurl 0.1.2 meshio 5.3.5 mistune 3.0.2 more-itertools 10.3.0 msgpack 1.0.8 multidict 6.0.5 mypy-extensions 1.0.0 nbclient 0.10.0 nbconvert 7.16.4 nbformat 5.10.4 nest-asyncio 1.6.0 nh3 0.2.18 nltk 3.8.1 notebook_shim 0.2.4 numpy 1.26.4 numpydoc 1.7.0 overrides 7.7.0 packaging 24.1 pandas 2.2.2 pandocfilters 1.5.1 paramiko 3.4.0 parso 0.8.4 pathspec 0.12.1 pexpect 4.9.0 pickleshare 0.7.5 pillow 10.4.0 pip 24.1.2 pkginfo 1.10.0 platformdirs 3.11.0 plotly 5.22.0 pluggy 1.5.0 pooch 1.8.2 prometheus_client 0.20.0 prompt_toolkit 3.0.47 protobuf 4.25.3 psutil 5.9.8 ptyprocess 0.7.0 pure-eval 0.2.2 pycodestyle 2.11.1 pycparser 2.22 pydocstyle 6.3.0 pyflakes 3.2.0 Pygments 2.18.0 pylint 3.2.5 pylint-venv 3.0.3 pyls-spyder 0.4.0 PyNaCl 1.5.0 pyparsing 3.1.2 pypng 0.20220715.0 pyproject_hooks 1.1.0 PyQt5 5.15.10 PyQt5-Qt5 5.15.2 PyQt5_sip 12.15.0 PyQtWebEngine 5.15.6 PyQtWebEngine-Qt5 5.15.2 python-dateutil 2.9.0.post0 python-json-logger 2.0.7 python-lsp-black 2.0.0 python-lsp-jsonrpc 1.1.2 python-lsp-server 1.11.0 python-slugify 8.0.4 pytoolconfig 1.3.1 pytz 2024.1 pyvista 0.43.10 pyvistaqt 0.11.1 pywin32 306 pywin32-ctypes 0.2.2 pywinpty 2.0.13 PyYAML 6.0.1 pyzmq 26.0.3 QDarkStyle 3.2.3 qstylizer 0.2.3 QtAwesome 1.3.1 qtconsole 5.5.2 QtPy 2.4.1 readme_renderer 44.0 referencing 0.35.1 regex 2024.5.15 requests 2.31.0 requests-toolbelt 1.0.0 retrying 1.3.4 rfc3339-validator 0.1.4 rfc3986 2.0.0 rfc3986-validator 0.1.1 rich 13.7.1 rope 1.13.0 rpds-py 0.18.1 Rtree 1.3.0 scikit-learn 1.5.1 scipy 1.14.0 scooby 0.10.0 Send2Trash 1.8.3 setuptools 65.5.0 simpervisor 1.0.0 six 1.16.0 sniffio 1.3.1 snowballstemmer 2.2.0 sortedcontainers 2.4.0 soupsieve 2.5 Sphinx 7.4.5 sphinxcontrib-applehelp 1.0.8 sphinxcontrib-devhelp 1.0.6 sphinxcontrib-htmlhelp 2.0.5 sphinxcontrib-jsmath 1.0.1 sphinxcontrib-qthelp 1.0.7 sphinxcontrib-serializinghtml 1.1.10 spyder 5.5.5 spyder-kernels 2.5.2 sqlparse 0.5.0 stack-data 0.6.3 tabulate 0.9.0 tenacity 8.5.0 terminado 0.18.1 text-unidecode 1.3 textdistance 4.6.3 threadpoolctl 3.5.0 three-merge 0.1.1 tinycss2 1.3.0 tomli 2.0.1 tomlkit 0.13.0 tornado 6.4.1 tqdm 4.66.4 traitlets 5.14.3 trame 3.6.3 trame-client 3.2.1 trame-server 3.0.3 trame-vtk 2.8.9 trame-vuetify 2.6.1 twine 5.1.1 types-python-dateutil 2.9.0.20240316 typing_extensions 4.12.2 tzdata 2024.1 ujson 5.10.0 uri-template 1.3.0 urllib3 1.26.19 vtk 9.3.1 watchdog 4.0.1 wcwidth 0.2.13 webcolors 24.6.0 webencodings 0.5.1 websocket-client 1.8.0 Werkzeug 3.0.3 whatthepatch 1.0.6 widgetsnbextension 4.0.11 wslink 2.1.1 yapf 0.40.2 yarl 1.9.4 zipp 3.19.2

velpulagopiraju commented 4 months ago

@prmukherj, @ajain-work, @seanpearsonuk can i get any update on this.