{"action":"closed","issue":{"url":"https://api.github.com/repos/pschillinger/rqt_launchtree/issues/1","repository_url":"https://api.github.com/repos/pschillinger/rqt_launchtree","labels_url":"https://api.github.com/repos/pschillinger/rqt_launchtree/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/pschillinger/rqt_launchtree/issues/1/comments","events_url":"https://api.github.com/repos/pschillinger/rqt_launchtree/issues/1/events","html_url":"https://github.com/pschillinger/rqt_launchtree/issues/1","id":154708596,"number":1,"title":"arg and node with identical names on same level cause AttributeError","user":{"login":"heuristicus","id":636456,"avatar_url":"https://avatars.githubusercontent.com/u/636456?v=3","gravatar_id":"","url":"https://api.github.com/users/heuristicus","html_url":"https://github.com/heuristicus","followers_url":"https://api.github.com/users/heuristicus/followers","following_url":"https://api.github.com/users/heuristicus/following{/other_user}","gists_url":"https://api.github.com/users/heuristicus/gists{/gist_id}","starred_url":"https://api.github.com/users/heuristicus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/heuristicus/subscriptions","organizations_url":"https://api.github.com/users/heuristicus/orgs","repos_url":"https://api.github.com/users/heuristicus/repos","events_url":"https://api.github.com/users/heuristicus/events{/privacy}","received_events_url":"https://api.github.com/users/heuristicus/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-05-13T13:12:26Z","updated_at":"2016-05-22T13:39:54Z","closed_at":"2016-05-22T13:39:54Z","body":"Here's a launch file which can be used to reproduce the problem:\r\n\r\n```\r\n<launch>\r\n  <arg name=\"turtlesim_name\" default=\"turtlesim_name\"/>\r\n  <node pkg=\"turtlesim\" type=\"turtlesim_node\" name=\"turtlesim_name\"/>\r\n</launch>\r\n```\r\n\r\nThe error that results is `'Node' object has no attribute 'value'`. This is caused by an attempted merge between the arg object and node object, on [this line](https://github.com/pschillinger/rqt_launchtree/blob/b78e84476cc889486532601f0853803e360639c7/src/rqt_launchtree/launchtree_config.py#L15). It's more likely that this is a problem caused by the [`_add_to_tree`](https://github.com/pschillinger/rqt_launchtree/blob/b78e84476cc889486532601f0853803e360639c7/src/rqt_launchtree/launchtree_config.py#L60) function not being specific enough when there are duplicate keys.\r\n\r\nIf the launch file is this way round, then the arg is not displayed at all.\r\n\r\n```\r\n<launch>\r\n  <node pkg=\"turtlesim\" type=\"turtlesim_node\" name=\"turtlesim_name\"/>\r\n  <arg name=\"turtlesim_name\" default=\"turtlesim_name\"/>\r\n</launch>\r\n```\r\n\r\nIn the case of parameters, it works fine because they have a `/` prepended to the string, so the key is not identical.\r\n\r\nPerhaps instead of using only the name of the item as the key, it could be a tuple `(item_name, item_number)` or something similar, where the number in the second tuple field is incremented if there are two identically named items on the same level."}}
{"actor":{"display_login":"pschillinger"}}