Skip to content

bug: filepath in MeshSeries

After updated to the latest version, this if-condition in MeshSeries leads to the following error

File ~/.venv/lib/python3.13/site-packages/ogstools/meshlib/mesh_series.py:370, in MeshSeries.mesh(self, timestep, lazy_eval)
    368     mesh.filepath = Path(self.timestep_files[data_timestep])
    369 else:
--> 370     mesh.filepath = self.filepath
    371 return mesh

File ~/.venv/lib/python3.13/site-packages/pyvista/core/utilities/misc.py:331, in _NoNewAttrMixin.__setattr__(self, key, value)
    324         from pyvista import PyVistaAttributeError  # noqa: PLC0415
    326         msg = (
    327             f'Attribute {key!r} does not exist and cannot be added to class '
    328             f'{self.__class__.__name__!r}\nUse `pv.set_new_attribute` to set new '
    329             f'attributes or consider setting a private variable (with `_` prefix) instead.'
    330         )
--> 331         raise PyVistaAttributeError(msg)
    332 object.__setattr__(self, key, value)

PyVistaAttributeError: Attribute 'filepath' does not exist and cannot be added to class 'PolyData'
Use `pv.set_new_attribute` to set new attributes or consider setting a private variable (with `_` prefix) instead.

Commented that if-condition fixes the error temporally.

Categories

  • preprocessing
  • postprocessing
  • visualization
  • HPC
  • application specific scripts
  • add your own category...

Example

If sensible, please add a screenshot something similar for illustration.