Skip to content

Validation Code Error #7

@ptth222

Description

@ptth222

I am using the following code to validate a manually built mwTab JSON:
validated_file, errors = mwtab.validator.validate_file(mwtabfile, verbose=True)

It produced an error like:

Error Log:
SCHEMA: Section "COLLECTION" does not match the allowed schema. dictionary changed size during iteration

This is obviously not a proper schema error and is a code error. I tracked it down to the validate_section_schema function which is trying to edit a dictionary while looping over it which results in the "RuntimeError: dictionary changed size during iteration".

This is an obvious problem that needs to be fixed, but there is also another question. Should "validate" be editing the object? In my opinion "validation" should not edit whatever is being validated, it should simply report all problems.

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