Skip to content

UnboundLocalError: local variable 'i' referenced before assignment when shallow copying a c3d file with no events #48

@jaraujo98

Description

@jaraujo98

When copying a c3d file with no events the variable i in this line is never defined, and the code crashes.

write_count = min(i + 1, 18)

Is fixing this as easy as just returning an empty list, or is there more to it? If it's just returning an empty list, happy to open a PR for it.

Metadata

Metadata

Assignees

No one assigned

    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