Skip to content

Branch develop: CLI fails to validate what previously worked in branch web #8

@sneumann

Description

@sneumann

Describe the bug
CLI validation fails in develop branch (a0dfa7c).
with error shown below.
It would be great to include that branch in the github action https://github.com/ElixirTeSS/bioschemas-validator/actions
Yours,
Steffen

sneumann@laptop:~/src/bioschemas-validator$ cat empty.json
{
}
sneumann@laptop:~/src/bioschemas-validator$ python command.py validate  --target_data=empty.json
Action: validate, target: empty.json
Traceback (most recent call last):
  File "/home/sneumann/src/bioschemas-validator/command.py", line 229, in validateData
    data, dataPath = path_to_dict(pathlib.Path(dataName))
  File "/home/sneumann/src/bioschemas-validator/src/Classes/validator.py", line 286, in path_to_dict
    orgString = path.read_text()
  File "/home/sneumann/miniconda3/lib/python3.9/pathlib.py", line 1266, in read_text
    with self.open(mode='r', encoding=encoding, errors=errors) as f:
  File "/home/sneumann/miniconda3/lib/python3.9/pathlib.py", line 1252, in open
    return io.open(self, mode, buffering, encoding, errors, newline,
  File "/home/sneumann/miniconda3/lib/python3.9/pathlib.py", line 1120, in _opener
    return self._accessor.open(self, flags, mode)
FileNotFoundError: [Errno 2] No such file or directory: '{'

Working version in web branch (00b6608)

sneumann@laptop:~/src/bioschemas-validator$ python src/command.py validate  --target_data=empty.json && cat output.txt 
Action: validate
empty.json is a file
The target metadata is empty.json
###########Start Validation#############
The profile schemas, "", does not yet exist in the profile JSON schema directory, please add it first by running buildprofile with the source data for "".
###########End Validation#############

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