Skip to content

OSError: File must be a valid c3d file: iostream error #2

@rmndrs89

Description

@rmndrs89

Loading the .c3d file is still problematic for me. I am not sure why. Checking the data path with either os.path.isfile(...) or via Path(..).exists() returns True. Is this a known issue?

>>> from pyomeca import Markers
>>> data_path = "datasets/pyomeca/tests/data/markers_analogs.c3d"
>>> import os
>>> os.path.isfile(data_path)
True
>>> from pathlib import Path
>>> Path(data_path).exists()
True
>>> markers = Markers.from_c3d(data_path, prefix_delimiter=":")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/robbin/miniconda3/envs/esmac-2024-python-seminar/lib/python3.10/site-packages/pyomeca/markers.py", line 392, in from_c3d
    return read.read_c3d(
  File "/home/robbin/miniconda3/envs/esmac-2024-python-seminar/lib/python3.10/site-packages/pyomeca/io/read.py", line 22, in read_c3d
    reader = ezc3d.c3d(f"{filename}").c3d_swig
  File "/home/robbin/miniconda3/envs/esmac-2024-python-seminar/lib/python3.10/site-packages/ezc3d/__init__.py", line 134, in __init__
    self.c3d_swig = ezc3d.c3d(path, ignore_bad_formatting)
  File "/home/robbin/miniconda3/envs/esmac-2024-python-seminar/lib/python3.10/site-packages/ezc3d/ezc3d.py", line 1874, in __init__
    _ezc3d.c3d_swiginit(self, _ezc3d.new_c3d(*args))
OSError: File must be a valid c3d file: iostream error

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions