I had a look at the trame tutorials, and they all work, except the paraview example:
I get this error and I do not know what to do with it: $ pvpython 05_paraview/StateLoader.py --venv .pvenv --data ./data/pv-state.pvsm
Traceback (most recent call last):
File “Codes/trame/trame-tutorial/05_paraview/StateLoader.py”, line 5, in
from trame.html import vuetify, paraview
File “/usr/local/lib/python3.9/dist-packages/trame/html/paraview/init.py”, line 1, in
from trame.html.vtk.common import (
File “/usr/local/lib/python3.9/dist-packages/trame/html/vtk/init.py”, line 21, in
use_module(VTK)
File “/usr/local/lib/python3.9/dist-packages/trame/html/vtk/common.py”, line 11, in use_module
_app.enable_module(m)
AttributeError: ‘App’ object has no attribute ‘enable_module’
I guess there is some paraview functionality missing? I’ve installed paraview superbuild from github:
$ paraview --version
paraview version 5.10.1-799-gb5dd20f80e
Thanks, using the paraview 5.10.1 package works. Actually, this example also works with my superbuild version.
However, the paraview example from the trame tutorial is not working for either
With the precompiled paraview, I get this:
~/Codes/paraview/ParaView-5.10.1-MPI-Linux-Python3.9-x86_64/bin/pvpython 05_paraview/StateLoader.py --venv ./pv_venv --data ./data/pv-state.pvsm
Traceback (most recent call last):
File "/home/nijso/Codes/trame/trame-tutorial/05_paraview/StateLoader.py", line 4, in <module>
from trame import get_cli_parser
ImportError: cannot import name 'get_cli_parser' from 'trame' (unknown location)
Ok the reason was that I was using a local venv import as it was not available from ParaView at the time of the tutorial. To make the tutorial works you need to be inside that directory.
Still updating the tutorial code to import the now available venv helper directly from ParaView…