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

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

Open
sneumann opened this issue Oct 4, 2022 · 0 comments

Comments

@sneumann
Copy link

sneumann commented Oct 4, 2022

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#############
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant