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

Bugfix: isa-json not working when tool is not launched in the ENA-upload-cli directory #90

Merged
merged 1 commit into from
Feb 26, 2024

Conversation

bedroesb
Copy link
Collaborator

This will fix:

Traceback (most recent call last):
  File "/home/bedro/.pyenv/versions/3.11.3/bin/ena-upload-cli", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/bedro/.pyenv/versions/3.11.3/lib/python3.11/site-packages/ena_upload/ena_upload.py", line 889, in main
    submission = EnaSubmission.from_isa_json(isa_json, required_assays)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/bedro/.pyenv/versions/3.11.3/lib/python3.11/site-packages/ena_upload/json_parsing/ena_submission.py", line 92, in from_isa_json
    validate_isa_json(isa_json)
  File "/home/bedro/.pyenv/versions/3.11.3/lib/python3.11/site-packages/ena_upload/json_parsing/ena_submission.py", line 49, in validate_isa_json
    IsaBase.validate_json(isa_json, EnaSubmission.investigation_schema)
  File "/home/bedro/.pyenv/versions/3.11.3/lib/python3.11/site-packages/ena_upload/json_parsing/characteristic.py", line 16, in validate_json
    json_file = open(schema_path)
                ^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: './ena_upload/json_parsing/json_schemas/investigation_schema.json'

When the script is launched outside its original repo. Important to get working for the Galaxy tool wrapper.

@bedroesb bedroesb added the bug Something isn't working label Feb 26, 2024
@bedroesb bedroesb merged commit b8fcc64 into master Feb 26, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants