{"action":"created","issue":{"url":"https://api.github.com/repos/astropy/pyregion/issues/106","repository_url":"https://api.github.com/repos/astropy/pyregion","labels_url":"https://api.github.com/repos/astropy/pyregion/issues/106/labels{/name}","comments_url":"https://api.github.com/repos/astropy/pyregion/issues/106/comments","events_url":"https://api.github.com/repos/astropy/pyregion/issues/106/events","html_url":"https://github.com/astropy/pyregion/issues/106","id":190396731,"number":106,"title":"Failure to properly parse DS9 region files that contain RGB colors such as \"#6a8\"","user":{"login":"deprecated","id":161264,"avatar_url":"https://avatars.githubusercontent.com/u/161264?v=3","gravatar_id":"","url":"https://api.github.com/users/deprecated","html_url":"https://github.com/deprecated","followers_url":"https://api.github.com/users/deprecated/followers","following_url":"https://api.github.com/users/deprecated/following{/other_user}","gists_url":"https://api.github.com/users/deprecated/gists{/gist_id}","starred_url":"https://api.github.com/users/deprecated/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deprecated/subscriptions","organizations_url":"https://api.github.com/users/deprecated/orgs","repos_url":"https://api.github.com/users/deprecated/repos","events_url":"https://api.github.com/users/deprecated/events{/privacy}","received_events_url":"https://api.github.com/users/deprecated/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-11-18T19:05:42Z","updated_at":"2016-11-18T23:05:40Z","closed_at":null,"body":"Hi, \r\n\r\nThere seems to be a bug with the parsing of DS9 regions if the color has a hash sign in it.  Here is an example:\r\n```\r\nimport pyregion\r\nbadstring = 'fk5;ellipse(5:34:26.665,-5:26:16.18,6.62208\",12.3556\",345) # color=#6a8 width=4 text={4267-616 (-55)} tag={Fast blue}'\r\ngoodstring = badstring.replace('#6a8', '6a8')\r\n\r\nbadregion, =  pyregion.parse(badstring)\r\ngoodregion, = pyregion.parse(goodstring)\r\n\r\nprint('pyregion version', pyregion.__version__)\r\nprint('Bad region:', badregion.attr)\r\nprint('Good region:', goodregion.attr)\r\n```\r\nwhich gives me the following output \r\n```\r\npyregion version 2.0.dev275\r\nBad region: (['color'], {})\r\nGood region: ([], {'width': '4 ', 'text': '4267-616 (-55)', 'color': '6a8', 'tag': {'Fast blue'}})\r\n```\r\n\r\nI tried the new `astropy.regions` and that did not show the same problem.   However, it doesn't seem to support masks yet, which I make extensive use of.  \r\n\r\nI can work around the problem by filtering out the hash signs before parsing with pyregion, so it is not such a big deal. \r\n\r\nWill"},"comment":{"url":"https://api.github.com/repos/astropy/pyregion/issues/comments/261665401","html_url":"https://github.com/astropy/pyregion/issues/106#issuecomment-261665401","issue_url":"https://api.github.com/repos/astropy/pyregion/issues/106","id":261665401,"user":{"login":"deprecated","id":161264,"avatar_url":"https://avatars.githubusercontent.com/u/161264?v=3","gravatar_id":"","url":"https://api.github.com/users/deprecated","html_url":"https://github.com/deprecated","followers_url":"https://api.github.com/users/deprecated/followers","following_url":"https://api.github.com/users/deprecated/following{/other_user}","gists_url":"https://api.github.com/users/deprecated/gists{/gist_id}","starred_url":"https://api.github.com/users/deprecated/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deprecated/subscriptions","organizations_url":"https://api.github.com/users/deprecated/orgs","repos_url":"https://api.github.com/users/deprecated/repos","events_url":"https://api.github.com/users/deprecated/events{/privacy}","received_events_url":"https://api.github.com/users/deprecated/received_events","type":"User","site_admin":false},"created_at":"2016-11-18T23:05:40Z","updated_at":"2016-11-18T23:05:40Z","body":"OK, thanks for the response.  I'll certainly keep on eye on the progress of that PR then.  Elliptical and rectangular regions would be enough for me. "}}
{"actor":{"display_login":"deprecated"}}