Error python-path

Dear ParaView Team,
I use Paraview to visualize gprMax data (ground penetrating radar).
I get the following error message with Linux Mint:

Traceback (last call):
File “”, line 185, in
File “/home/jan/Downloads/digital dike runner/ParaView-5.12.0-RC3-MPI-Linux-Python3.10-x86_64/bin/…/lib/python3.10/”, line 152, in dirname
p = os.fspath(p)
TypeError: expects str, bytes or os.PathLike object, not FileNameProperty

and with Windows 11:

Traceback (last call):
File “”, line 185, in
File “C:\Program Files\ParaView 5.11.2\bin\lib\”, line 223, in dirname
return split(p)[0]
File “C:\Program Files\ParaView 5.11.2\bin\lib\”, line 185, in split
p = os.fspath(p)
TypeError: expects str, bytes or os.PathLike object, not FileNameProperty

This is a path error: How can this be fixed or which older python-gprMax-Parview version harmonizes?

best regards


Welcome to the ParaView Discourse, @igel89.

Beginning with starting ParaView, what are the exact steps you are following that lead to this error?

The error is telling you that p in some code is passing in a FileNameProperty, which is an object that you can retrieve a path from, but is itself not a path. What is the Python code and where is it being defined?

If you have access to this code, change the p argument to os.fspath(p) to p.GetElement(0) and you should be good to go.

Thank you for your quick reply
I use the program gprMax which works on python with miniconda. see install

This program is integrated as a macro in Paraview

Execution of gprMax in miniconda
cd C:\Users\Igel\gprMax
conda activate gprMax

To test an animation with standard example:

Since this is only a model and not an animation, the code for ‘snapshot’ is added as a loop ==> .vti

for i in range(1, 31):
print(‘#snapshot: x1 y1 z1 x2 y2 z2 dx dy dz {} snapshot{}’.format((i/10)*1e-9, i))

Insert the parameters from the 14th line of
print(‘#snapshot: 0 0 0 0.15 0.15 0.1 0.001 0.001 0.001 {} snapshot{}’.format((i/10)*1e-9, i))

python -m gprMax user_models/

Start Paraview
File/Open: user_models/snapshot1.vti
gprMax Macro activate

Previously the error message appeared here and when I change this from os.fspath(p) to p.GetElement(0) Paraview crashes.