Skip to content

NotImplementedError: Opaque datatype class not supported after last commit #70

@bushaev

Description

@bushaev

Hey!
I have this piece of code

def extract_offset(path, dset_name="_index"):
    # find index dataset and extract offset
    f = None
    try:
        f = pyfive.File(path)
        dset = f.get(dset_name)
        if dset is None:
            return None
        else:
            return dset._dataobjects.offset

    finally:
        if f is not None:
            f.close()

That used to work until the last merged PR, now it gives me this:

Traceback (most recent call last):
File "/workspace/cli/jobs/P3_split_audio.py", line 175, in <module>
run_task_cli(
File "/workspace/cli/common/job_utils.py", line 157, in run_task_cli
with artifact_manager_class(
File "/workspace/cli/common/artifacts/artifact_manager.py", line 190, in __exit__
artifact.save()
File "/workspace/cli/common/artifacts/split_audio.py", line 12, in save
make_index(self.h5_path)
File "/workspace/cli/common/artifacts/hdf5_indexer.py", line 91, in make_index
update_offset(path, dset_name)
File "/workspace/cli/common/artifacts/hdf5_indexer.py", line 26, in update_offset
offset = extract_offset(path, dset_name=dset_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/workspace/cli/common/artifacts/hdf5_indexer.py", line 14, in extract_offset
dset = f.get(dset_name)
^^^^^^^^^^^^^^^^
File "<frozen _collections_abc>", line 774, in get
File "/customer/.local/lib/python3.11/site-packages/pyfive/high_level.py", line 94, in __getitem__
return Dataset(obj_name, DatasetID(dataobjs), self)
^^^^^^^^^^^^^^^^^^^
File "/customer/.local/lib/python3.11/site-packages/pyfive/h5d.py", line 85, in __init__
if isinstance(dataobject.dtype,tuple):
^^^^^^^^^^^^^^^^
File "/customer/.local/lib/python3.11/site-packages/pyfive/dataobjects.py", line 355, in dtype
return DatatypeMessage(self.msg_data, msg_offset).dtype
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/customer/.local/lib/python3.11/site-packages/pyfive/datatype_msg.py", line 16, in __init__
self.dtype = self.determine_dtype()
^^^^^^^^^^^^^^^^^^^^^^
File "/customer/.local/lib/python3.11/site-packages/pyfive/datatype_msg.py", line 36, in determine_dtype
raise NotImplementedError("Opaque datatype class not supported.")
NotImplementedError: Opaque datatype class not supported.

Could you advise on how to fix the error ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions