trame: cannot run paraview example

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/ --venv .pvenv --data ./data/pv-state.pvsm

Traceback (most recent call last):
File “Codes/trame/trame-tutorial/05_paraview/”, line 5, in
from trame.html import vuetify, paraview
File “/usr/local/lib/python3.9/dist-packages/trame/html/paraview/”, line 1, in
from trame.html.vtk.common import (
File “/usr/local/lib/python3.9/dist-packages/trame/html/vtk/”, line 21, in
File “/usr/local/lib/python3.9/dist-packages/trame/html/vtk/”, line 11, in use_module
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

in the environment directory , there are references to enable_module:

~/Codes/trame/trame-tutorial/.pvenv/lib/python3.9$ grep -niIr 'enable_module' *

site-packages/trame/internal/app/ enable_module(module):
site-packages/trame/internal/app/    _app.enable_module(module)
site-packages/trame/html/vtk/    _app.enable_module(m)
site-packages/pywebvue/    def enable_module(self, module, **kwargs):
site-packages/pywebvue/        print("enableModule is deprecated, you should use 'enable_module' instead.")
site-packages/pywebvue/        self.enable_module(module, **kwargs)

I just tried the following and it is working for me.

  1. Download ParaView 5.10.1 from
  2. Run the following command lines
python3.9 -m venv pv_venv
source ./pv_venv/bin/activate
pip install -U pip
pip install trame
git clone
/Applications/ ./trame/examples/ParaView/StateViewer/ --venv ./pv_venv --data /.../diskout.pvsm

The following also worked

export PV_VENV=$PWD/pv_venv
/Applications/ ./trame/examples/ParaView/StateViewer/ --data /.../diskout.pvsm

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/ --venv ./pv_venv --data ./data/pv-state.pvsm                                              
Traceback (most recent call last):
File "/home/nijso/Codes/trame/trame-tutorial/05_paraview/", line 4, in <module>
from trame import get_cli_parser
ImportError: cannot import name 'get_cli_parser' from 'trame' (unknown location)

I guess you found an API change that was not updated in the tutorial repo… :wink:

I’ll fix the tutorial file… thx

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…