Skip to content

ads.py::bytes_from_dict(..) is broken for nested structures #475

@jimw-sics

Description

@jimw-sics

On line 440

                elif type(plc_datatype) is tuple:
                    bytecount = bytes_from_dict(
                        values=var[i], structure_def=plc_datatype
                    )

values=var[i] should be values=var. When var is a dict, doing getitem on the for-loop index is not meaningful, it is not a list.

Also, do not reuse variables and overwrite values, makes debugging a pain.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions