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/posixpath.py”, 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\ntpath.py”, line 223, in dirname
return split(p)[0]
File “C:\Program Files\ParaView 5.11.2\bin\lib\ntpath.py”, 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

Daniel

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
http://docs.gprmax.com/en/latest/index.html

This program is integrated as a macro in Paraview
http://docs.gprmax.com/en/latest/output.html#geometry-output

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

To test an animation with standard example:
http://docs.gprmax.com/en/latest/examples_advanced.html

Since this is only a model and not an animation, the code for ‘snapshot’ is added as a loop ==> .vti
http://docs.gprmax.com/en/latest/input.html#snapshot

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

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

Execute
python -m gprMax user_models/heterogeneous_soil.in

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.