Skip to content

Bug report: src/schema_linter.py failing #1596

Open
@arschat

Description

@arschat

Since #1575 PR in json_schema/system/file_descriptor.json where a new property dri_uri was introduced, we get an error in schema linter script triggered by github actions

Run python ./src/schema_linter.py
Traceback (most recent call last):
Linting 89 schemas
File "/home/runner/work/metadata-schema/metadata-schema/./src/schema_linter.py", line 355, in
return_msg = linter.lintSchema(s, ols_api)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/work/metadata-schema/metadata-schema/./src/schema_linter.py", line 168, in lintSchema
errors.append(schema_filename + ".json: Type " + properties[property]['type'] + " is not a valid JSON type.")
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
TypeError: can only concatenate str (not "list") to str
Error: Process completed with exit code 1.

The linter is failing because properties[property]['type'] which is expected to be a str is a list and cannot be concatenated to print the error.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugBug in metadata schema, code, or examples.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions