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

planemo autoupdate may fail on tools but exit code is 0 #1478

Open
lldelisle opened this issue Sep 26, 2024 · 0 comments
Open

planemo autoupdate may fail on tools but exit code is 0 #1478

lldelisle opened this issue Sep 26, 2024 · 0 comments

Comments

@lldelisle
Copy link
Contributor

Hi,
I noticed it with the autoupdate CI, if you get for example a tool with a problem in the XML like https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/inforna
When you run planemo autoupdate ., you get in the stderr:

galaxy.util ERROR: Error parsing file /home/ldelisle/Documents/mygit/galaxytools/tools/rna_tools/inforna/inforna.xml
Traceback (most recent call last):
  File "/home/ldelisle/planemo/lib/python3.11/site-packages/galaxy/util/__init__.py", line 352, in parse_xml
    tree = cast(ElementTree, etree.parse(str(fname), parser=parser))
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "src/lxml/etree.pyx", line 3548, in lxml.etree.parse
  File "src/lxml/parser.pxi", line 1879, in lxml.etree._parseDocument
  File "src/lxml/parser.pxi", line 1905, in lxml.etree._parseDocumentFromURL
  File "src/lxml/parser.pxi", line 1808, in lxml.etree._parseDocFromFile
  File "src/lxml/parser.pxi", line 1180, in lxml.etree._BaseParser._parseDocFromFile
  File "src/lxml/parser.pxi", line 618, in lxml.etree._ParserContext._handleParseResultDoc
  File "src/lxml/parser.pxi", line 728, in lxml.etree._handleParseResult
  File "src/lxml/parser.pxi", line 657, in lxml.etree._raiseParseError
  File "/home/ldelisle/Documents/mygit/galaxytools/tools/rna_tools/inforna/inforna.xml", line 38
lxml.etree.XMLSyntaxError: attributes construct error, line 38, column 54
Error loading tool with path /home/ldelisle/Documents/mygit/galaxytools/tools/rna_tools/inforna/inforna.xml
Traceback (most recent call last):
  File "/home/ldelisle/planemo/lib/python3.11/site-packages/galaxy/tool_util/loader_directory.py", line 104, in _load_tools_from_path
    tool_element = loader_func(possible_tool_file)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ldelisle/Documents/mygit/galaxytools/tools/rna_tools/inforna/inforna.xml", line 38
lxml.etree.XMLSyntaxError: attributes construct error, line 38, column 54
galaxy.util ERROR: Error parsing file /home/ldelisle/Documents/mygit/galaxytools/tools/rna_tools/inforna/inforna.xml
Traceback (most recent call last):
  File "/home/ldelisle/planemo/lib/python3.11/site-packages/galaxy/util/__init__.py", line 352, in parse_xml
    tree = cast(ElementTree, etree.parse(str(fname), parser=parser))
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "src/lxml/etree.pyx", line 3548, in lxml.etree.parse
  File "src/lxml/parser.pxi", line 1879, in lxml.etree._parseDocument
  File "src/lxml/parser.pxi", line 1905, in lxml.etree._parseDocumentFromURL
  File "src/lxml/parser.pxi", line 1808, in lxml.etree._parseDocFromFile
  File "src/lxml/parser.pxi", line 1180, in lxml.etree._BaseParser._parseDocFromFile
  File "src/lxml/parser.pxi", line 618, in lxml.etree._ParserContext._handleParseResultDoc
  File "src/lxml/parser.pxi", line 728, in lxml.etree._handleParseResult
  File "src/lxml/parser.pxi", line 657, in lxml.etree._raiseParseError
  File "/home/ldelisle/Documents/mygit/galaxytools/tools/rna_tools/inforna/inforna.xml", line 38
lxml.etree.XMLSyntaxError: attributes construct error, line 38, column 54
Error loading tool with path /home/ldelisle/Documents/mygit/galaxytools/tools/rna_tools/inforna/inforna.xml
Traceback (most recent call last):
  File "/home/ldelisle/planemo/lib/python3.11/site-packages/galaxy/tool_util/loader_directory.py", line 104, in _load_tools_from_path
    tool_element = loader_func(possible_tool_file)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ldelisle/Documents/mygit/galaxytools/tools/rna_tools/inforna/inforna.xml", line 38
lxml.etree.XMLSyntaxError: attributes construct error, line 38, column 54
/home/ldelisle/Documents/mygit/galaxytools/tools/rna_tools/inforna/inforna.xml could not be updated - the following error was raised: not well-formed (invalid token): line 38, column 53

And in the stdout:

Auto-updating tool /home/ldelisle/Documents/mygit/galaxytools/tools/rna_tools/inforna/inforna.xml
Could not update /home/ldelisle/Documents/mygit/galaxytools/tools/rna_tools/inforna/inforna.xml due to malformed xml.

But exit code is 0 while I would expect it to be 0.

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