Skip to content

PrimePlotter failing to show the modelΒ #1074

@Abdullah-Azbah

Description

@Abdullah-Azbah

πŸ” Before submitting the issue

  • I have searched among the existing issues
  • I am using a Python virtual environment

🐞 Description of the bug

When trying to run any of the examples provided on you get the following error:

Traceback (most recent call last):
  File "C:\Users\Abdulla\PycharmProjects\MiscProjects\pyansys_testing\example_template.py", line 21, in <module>
    display.show()
  File "C:\Users\Abdulla\PycharmProjects\MiscProjects\venv312\Lib\site-packages\ansys\meshing\prime\graphics\plotter.py", line 336, in show
    self._backend.show(
  File "C:\Users\Abdulla\PycharmProjects\MiscProjects\venv312\Lib\site-packages\ansys\tools\visualization_interface\backends\pyvista\pyvista.py", line 482, in show
    self.show_plotter(screenshot, **show_options)
  File "C:\Users\Abdulla\PycharmProjects\MiscProjects\venv312\Lib\site-packages\ansys\tools\visualization_interface\backends\pyvista\pyvista.py", line 518, in show_plotter
    self.pv_interface.show(screenshot=screenshot, **kwargs)
  File "C:\Users\Abdulla\PycharmProjects\MiscProjects\venv312\Lib\site-packages\ansys\tools\visualization_interface\backends\pyvista\pyvista_interface.py", line 368, in show
    self.scene.show(**kwargs)
  File "C:\Users\Abdulla\PycharmProjects\MiscProjects\venv312\Lib\site-packages\pyvista\plotting\plotter.py", line 6915, in show
    assert_empty_kwargs(**kwargs)
  File "C:\Users\Abdulla\PycharmProjects\MiscProjects\venv312\Lib\site-packages\pyvista\core\utilities\misc.py", line 59, in assert_empty_kwargs
    raise TypeError(message)
TypeError: "object" is an invalid keyword argument for `show`

Process finished with exit code 1

The issue seems to be cause by a typo in

if plottable_object is not None:
self.plot(plottable_object, name_filter=name_filter, scope=scope, **plotting_options)
self._backend.show(
object=plottable_object,
screenshot=screenshot,
name_filter=name_filter,
**plotting_options,
)

object=plottable_object should be plottable_object=plottable_object

πŸ“ Steps to reproduce

run the following code:

import ansys.meshing.prime as prime
from ansys.meshing.prime.graphics import PrimePlotter

prime_client = prime.launch_prime()
model = prime_client.model

mesh_util = prime.lucid.Mesh(model=model)

mixing_elbow = prime.examples.download_elbow_fmd()
mesh_util.read(mixing_elbow)

mesh_util.surface_mesh(min_size=5, max_size=20)
mesh_util.volume_mesh(
    volume_fill_type=prime.VolumeFillType.POLY,
    prism_surface_expression="* !inlet !outlet",
    prism_layers=3,
)

display = PrimePlotter()
display.plot(model)
display.show()


prime_client.exit()

πŸ’» Which operating system are you using?

Windows

πŸ“€ Which ANSYS version are you using?

ANSYS 2024 R1

🐍 Which Python version are you using?

3.12

πŸ“¦ Installed packages

aiohappyeyeballs==2.6.1
aiohttp==3.12.13
aiosignal==1.3.2
ansys-api-dbu==0.3.22
ansys-api-geometry==0.4.62
ansys-api-meshing-prime==0.1.4
ansys-geometry-core==0.10.9
ansys-meshing-prime==0.8.1
ansys-tools-path==0.7.3
ansys-tools-visualization-interface==0.10.0
appdirs==1.4.4
attrs==25.3.0
beartype==0.20.2
certifi==2025.6.15
charset-normalizer==3.4.2
click==8.2.1
colorama==0.4.6
contourpy==1.3.2
cycler==0.12.1
flexcache==0.3
flexparser==0.4
fonttools==4.58.4
frozenlist==1.7.0
geomdl==5.4.0
grpcio==1.73.1
grpcio-health-checking==1.62.3
idna==3.10
kiwisolver==1.4.8
matplotlib==3.10.3
more-itertools==10.7.0
msgpack==1.1.1
multidict==6.6.3
numpy==2.3.1
packaging==25.0
pillow==11.2.1
Pint==0.24.4
platformdirs==4.3.8
pooch==1.8.2
propcache==0.3.2
protobuf==4.25.8
pyparsing==3.2.3
python-dateutil==2.9.0.post0
pyvista==0.45.2
PyYAML==6.0.2
requests==2.32.4
scipy==1.16.0
scooby==0.10.1
semver==3.0.4
six==1.17.0
trame==3.10.2
trame-client==3.9.1
trame-common==1.0.0
trame-server==3.4.2
trame-vtk==2.9.0
trame-vuetify==3.0.1
typing_extensions==4.14.0
urllib3==2.5.0
vtk==9.4.2
websockets==15.0.1
wslink==2.3.4
yarl==1.20.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions