galaxyproject / galaxyproject/planemo
Very unusual case error: crashes when parsing a "corrupted" xml file.
- Dominant language
- Python
- Stars
- 110
- Forks
- 102
- Avg merge
- 4d 21h
- Merged PRs (30d)
- 13
Description
FYI, this is an outer-space rare event, but I accidentally tar'd my tool files without specifying a target file name and this led to the first include file, macros.xml, being actually a binary gz file. Running "planemo lint" yeilded:
$ planemo lint
Error loading tool with path /usr/local/galaxy/production2/galaxy-dist/tools/TESTING/ffp_phylogeny/ffp_phylogeny.xml
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/planemo_ext/galaxy/tools/loader_directory.py", line 29, in load_tool_elements_from_path
tool_elements.append((file, loader.load_tool(file)))
ExpatError: not well-formed (invalid token): line 1, column 0
I.e. XML validator couldn't cope with that! Not sure you want to do anything about that but I can imagine it could happen again in a classroom setting.
Regards,
Damion
Contributor guide
Research direction
Start in planemo_ext/galaxy/tools/loader_directory.py at load_tool_elements_from_path and reproduce the failure with the reported planemo lint command and corrupted macros.xml input. Determine how malformed or binary XML is reported, then verify that lint produces a useful result instead of the shown unhandled ExpatError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100