Occasional job failure with /scripts/set_metadata.py ElementTree.parse(fname)
Hi all, Running galaxy-central default branch, I've seen a couple of cases where what otherwise appears to be a successful job has failed with: Traceback (most recent call last): File "./scripts/set_metadata.py", line 122, in <module> __main__() File "./scripts/set_metadata.py", line 72, in __main__ datatypes_registry.load_datatypes( root_dir=config_root, config=datatypes_config ) File "/mnt/galaxy/galaxy-central/lib/galaxy/datatypes/registry.py", line 67, in load_datatypes tree = galaxy.util.parse_xml( config ) File "/mnt/galaxy/galaxy-central/lib/galaxy/util/__init__.py", line 135, in parse_xml tree = ElementTree.parse(fname) File "/mnt/galaxy/galaxy-central/eggs/elementtree-1.2.6_20050316-py2.6.egg/elementtree/ElementTree.py", line 859, in parse File "/mnt/galaxy/galaxy-central/eggs/elementtree-1.2.6_20050316-py2.6.egg/elementtree/ElementTree.py", line 576, in parse IOError: [Errno 2] No such file or directory: '/mnt/galaxy/galaxy-central/database/tmp/tmpWJZ1Aw' I'm not quite sure what was in the temporary XML file which no longer exists, perhaps there is a race condition with the removal of the temporary files? Has anyone else observed this? Thanks, Peter One minor change which might help give a clearer error message here (and in related issues like the functional tests where not all the tools listed in tool_conf.xml.sample always exists on disk) is: $ hg diff /mnt/galaxy/galaxy-central/lib/galaxy/util/__init__.py diff -r 01b94ad2c377 lib/galaxy/util/__init__.py --- a/lib/galaxy/util/__init__.py Tue Oct 15 00:12:08 2013 -0400 +++ b/lib/galaxy/util/__init__.py Tue Oct 15 14:20:01 2013 +0100 @@ -132,6 +132,8 @@ def parse_xml(fname): """Returns a parsed xml tree""" + if not os.path.isfile(fname): + raise IOError("Asked to parse non-existant XML file %r" % fname) tree = ElementTree.parse(fname) root = tree.getroot() ElementInclude.include(root)
participants (1)
-
Peter Cock