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 paired end reads throwing type error #103

Merged
merged 1 commit into from
Jan 3, 2025
Merged

Bugfix paired end reads throwing type error #103

merged 1 commit into from
Jan 3, 2025

Conversation

bedroesb
Copy link
Collaborator

@bedroesb bedroesb commented Jan 3, 2025

When 250 is given as value in the metadata for insert_size, it was filled in as 250.0, which is not a valid xs:nonNegativeInteger value.

Throwing the error:

Traceback (most recent call last):
  File "/home/bedro/.pyenv/versions/3.11.3/envs/ena-upload-python/bin/ena-upload-cli", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/bedro/.pyenv/versions/3.11.3/envs/ena-upload-python/lib/python3.11/site-packages/ena_upload/ena_upload.py", line 1003, in main
    schema_xmls = run_construct(
                  ^^^^^^^^^^^^^^
  File "/home/bedro/.pyenv/versions/3.11.3/envs/ena-upload-python/lib/python3.11/site-packages/ena_upload/ena_upload.py", line 314, in run_construct
    schema_xmls[schema] = construct_xml(schema, stream, xsds[schema])
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/bedro/.pyenv/versions/3.11.3/envs/ena-upload-python/lib/python3.11/site-packages/ena_upload/ena_upload.py", line 253, in construct_xml
    validate_xml(xsd, xml_string)
  File "/home/bedro/.pyenv/versions/3.11.3/envs/ena-upload-python/lib/python3.11/site-packages/ena_upload/ena_upload.py", line 201, in validate_xml
    return xmlschema.assertValid(doc)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "src/lxml/etree.pyx", line 3691, in lxml.etree._Validator.assertValid
lxml.etree.DocumentInvalid: Element 'PAIRED', attribute 'NOMINAL_LENGTH': '250.0' is not a valid value of the atomic type 'xs:nonNegativeInteger'., line 15```

@bedroesb bedroesb merged commit 6101dc4 into master Jan 3, 2025
8 checks passed
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

Successfully merging this pull request may close these issues.

1 participant