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

Bug report: src/schema_linter.py failing #1596

Open
arschat opened this issue Dec 12, 2024 · 0 comments
Open

Bug report: src/schema_linter.py failing #1596

arschat opened this issue Dec 12, 2024 · 0 comments
Labels
bug Bug in metadata schema, code, or examples.

Comments

@arschat
Copy link
Collaborator

arschat commented Dec 12, 2024

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.

@arschat arschat added the bug Bug in metadata schema, code, or examples. label Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug in metadata schema, code, or examples.
Projects
None yet
Development

No branches or pull requests

1 participant