Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'tuple' object has no attribute 'axis_channels' #1075

Open
sunyuzhe2017 opened this issue Sep 8, 2024 · 2 comments
Open

Comments

@sunyuzhe2017
Copy link

version 7.4.5
when I use "cut", I got this error,

  m_cut = m.cut(start_time,stop_time,version="4.10")
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/test/miniconda3/lib/python3.12/site-packages/asammdf/mdf.py", line 924, in cut
    included_channels = self.included_channels(group_index)[group_index]
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/test/miniconda3/lib/python3.12/site-packages/asammdf/blocks/mdf_v4.py", line 7971, in included_channels
    dep.axis_channels,
    ^^^^^^^^^^^^^^^^^
AttributeError: 'tuple' object has no attribute 'axis_channels'

and I add two line code after this line https://github.com/danielhrisca/asammdf/blob/c9d0e449000ed70f2ea1dd47df7c80f3e74471c5/src/asammdf/blocks/mdf_v4.py#L7969C25-L7969C49
as follows to skip, hope you can check and fix it, thanks

    # ...
    for dep in dependencies:
        if not isinstance(dep, ChannelArrayBlock):
            continue
        for referenced_channels in (
            dep.axis_channels,
            dep.dynamic_size_channels,
            dep.input_quantity_channels,
        ):
    # ...
@danielhrisca
Copy link
Owner

the original MDF file would be useful to understand the root cause of the problem

@sunyuzhe2017
Copy link
Author

the original MDF file would be useful to understand the root cause of the problem

Recorder_2024-09-07_17-17-13_Cut_1-26s_canape.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants