paraview + trame

I tried the paraview + trame example:

https://kitware.github.io/trame/docs/tutorial-paraview.html

I got it working, but the steps on the website did not work for me.
In the tutorial, this step did not work for me:

~/Codes/ParaView-5.11.0-RC2-MPI-Linux-Python3.9-x86_64/bin/pvpython
./05_paraview/SimpleCone.py
–venv .pvenv

ModuleNotFoundError: No module named ‘trame’

But if I do this, the example works:

conda activate pv-env
python 05_paraview/SimpleCone.py --port 1234

Not sure if this matters in practice?
Also not sure how to get it working by directly calling paraview’s pvpython.

The following worked for me

conda deactivate   # make sure I don't have a blend of conda and local venv
unset PV_VENV      # make sure I don't have a global venv set for ParaView 

git clone https://github.com/Kitware/trame.git

python3.9 -m venv .venv
source .venv/bin/activate
pip install trame

/Applications/ParaView-5.10.1.app/Contents/bin/pvpython ./trame/examples/07_paraview/SimpleCone/RemoteRendering.py --port 1234 --venv .venv

And the tutorial one worked for me too

git clone https://github.com/Kitware/trame-tutorial.git
/Applications/ParaView-5.10.1.app/Contents/bin/pvpython ./trame-tutorial/05_paraview/SimpleCone.py --port 1234 --venv .venv

I use ParaView-5.12.0 and try this.
/Applications/ParaView-5.12.0/bin/pvpython ./trame-tutorial/05_paraview/SimpleCone.py --port 1234 --venv .pvenv

Then I got these information.
Thank you for help.

Traceback (most recent call last):
File “/data/ease/trame/./trame-tutorial/05_paraview/SimpleCone.py”, line 23, in
representation = simple.Show(cone)
File “/data/ease/trame/paraview-5.12/lib/python3.10/site-packages/paraview/simple.py”, line 725, in Show
rep = controller.Show(proxy, proxy.Port, view, representationType)
File “/data/ease/trame/paraview-5.12/lib/python3.10/site-packages/paraview/servermanager.py”, line 161, in getattr
return getattr(self.SMController, name)
AttributeError: ‘paraview.modules.vtkRemotingServerManager.vtkSMPar’ object has no attribute ‘Show’
double free or corruption (!prev)
error: exception occurred: Subprocess aborted

Can you try to run the following with your ParaView?

/data/ease/trame/paraview-5.12/bin/pvpython
$ from paraview import simple
$ cone = simple.Cone()
$ representation = simple.Show(cone)
$ view = simple.Render()

Thank you for your prompt reply.

Please see my comments below.

representation = simple.Show(cone)
Traceback (most recent call last):
File “”, line 1, in
File “/data/ease/trame/paraview-5.12/lib/python3.10/site-packages/paraview/simple.py”, line 725, in Show
rep = controller.Show(proxy, proxy.Port, view, representationType)
File “/data/ease/trame/paraview-5.12/lib/python3.10/site-packages/paraview/servermanager.py”, line 161, in getattr
return getattr(self.SMController, name)
AttributeError: ‘paraview.modules.vtkRemotingServerManager.vtkSMPar’ object has no attribute ‘Show’

Something is up with your ParaView. But don’t know what it is. Where does it come from?

@jourdain Frame does not support MEDReader? I want to red file format med and rmed
Thanks for your work

If MEDReader is available in VTK or ParaView, trame should support it.

Please note MEDReader is only available as an external plugin which is packaged in the binary release of ParaView and can be enabled in the ParaView superbuild.