Skip to content

fix duplicated attributes#403

Merged
jmchilton merged 1 commit intomasterfrom
fix_resolvers_conf
Jan 16, 2016
Merged

fix duplicated attributes#403
jmchilton merged 1 commit intomasterfrom
fix_resolvers_conf

Conversation

@bgruening
Copy link
Member

Remove one of the two prefix="" attributes from the resolvers_conf.xml which results in this error:

  File "/home/bag/projects/code/galaxy-test/lib/galaxy/tools/deps/__init__.py", line 44, in build_dependency_manager
    dependency_manager = DependencyManager( **dependency_manager_kwds )
  File "/home/bag/projects/code/galaxy-test/lib/galaxy/tools/deps/__init__.py", line 87, in __init__
    self.dependency_resolvers = self.__build_dependency_resolvers( conf_file )
  File "/home/bag/projects/code/galaxy-test/lib/galaxy/tools/deps/__init__.py", line 132, in __build_dependency_resolvers
    plugin_source = plugin_config.plugin_source_from_path( conf_file )
  File "/home/bag/projects/code/galaxy-test/lib/galaxy/util/plugin_config.py", line 74, in plugin_source_from_path
    return ('xml', ElementTree.parse( path ).getroot())
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1182, in parse
    tree.parse(source, parser)
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 656, in parse
    parser.feed(data)
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1642, in feed
    self._raiseerror(v)
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1506, in _raiseerror
    raise err
xml.etree.ElementTree.ParseError: duplicate attribute: line 2, column 66

@jmchilton
Copy link
Member

I just added this though because I don't want to use Galaxy's default. Is there another way to fix this?

@jmchilton
Copy link
Member

I reviewed 5e0b6d1 - I think we want this default but the "prefix" in attributes check is wrong. It should be something like if [a in attributes if "prefix" in a]: probably.

@bgruening
Copy link
Member Author

I guess we could remove this line: https://github.com/galaxyproject/planemo/blob/fix_resolvers_conf/planemo/galaxy_config.py#L675

Not tested, but then the conda_prefix is also not added.

@bgruening
Copy link
Member Author

Ok, will try this.

Remove one of the two prefix="" attributes from the `resolvers_conf.xml` which results in this error:

```
  File "/home/bag/projects/code/galaxy-test/lib/galaxy/tools/deps/__init__.py", line 44, in build_dependency_manager
    dependency_manager = DependencyManager( **dependency_manager_kwds )
  File "/home/bag/projects/code/galaxy-test/lib/galaxy/tools/deps/__init__.py", line 87, in __init__
    self.dependency_resolvers = self.__build_dependency_resolvers( conf_file )
  File "/home/bag/projects/code/galaxy-test/lib/galaxy/tools/deps/__init__.py", line 132, in __build_dependency_resolvers
    plugin_source = plugin_config.plugin_source_from_path( conf_file )
  File "/home/bag/projects/code/galaxy-test/lib/galaxy/util/plugin_config.py", line 74, in plugin_source_from_path
    return ('xml', ElementTree.parse( path ).getroot())
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1182, in parse
    tree.parse(source, parser)
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 656, in parse
    parser.feed(data)
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1642, in feed
    self._raiseerror(v)
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1506, in _raiseerror
    raise err
xml.etree.ElementTree.ParseError: duplicate attribute: line 2, column 66
```
@bgruening
Copy link
Member Author

@jmchilton like this?

@jmchilton
Copy link
Member

Yeah - does that work?

@bgruening
Copy link
Member Author

Seems so!

@bgruening
Copy link
Member Author

@jmchilton ok it works here: https://travis-ci.org/galaxyproject/tools-iuc/builds/102700945

The planemo error looks strange but this is an other problem.

jmchilton added a commit that referenced this pull request Jan 16, 2016
@jmchilton jmchilton merged commit 86328a6 into master Jan 16, 2016
@jmchilton jmchilton deleted the fix_resolvers_conf branch January 16, 2016 04:13
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.

2 participants