I've been provided with an ansys output file that makes use of quotes for the filenames.
The encas file looks like this
FORMAT
type: ensight gold
GEOMETRY
model: "filename.geo"
VARIABLE
scalar per element: uds_1_scalar "filename.scl1"
vector per element: velocity "filename.vel"
SCRIPTS
metadata: "filename.xml"
this leads to the files not being found as it looks like ensight-reader assumes these filenames don't have quotes so it makes a string with a double quote and errors
>>> case.get_variable(v[0])
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/j/miniforge-pypy3/envs/f4enix_dev/lib/python3.11/site-packages/ensightreader.py", line 1698, in get_variable
self._variable_file_cache[cache_key] = self.variables[name].get_file(geofile=geofile, timestep=timestep)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/j/miniforge-pypy3/envs/f4enix_dev/lib/python3.11/site-packages/ensightreader.py", line 1511, in get_file
return EnsightVariableFile.from_file_path(path, variable_name=self.variable_name,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/j/miniforge-pypy3/envs/f4enix_dev/lib/python3.11/site-packages/ensightreader.py", line 1251, in from_file_path
with open(file_path, "rb") as fp:
^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '"filename.scl1"'
I guess this is due to Ansys putting quotes where there should not be quotes
I've been provided with an ansys output file that makes use of quotes for the filenames.
The
encas
file looks like thisthis leads to the files not being found as it looks like ensight-reader assumes these filenames don't have quotes so it makes a string with a double quote and errors
I guess this is due to Ansys putting quotes where there should not be quotes