{"action":"opened","issue":{"url":"https://api.github.com/repos/inasafe/inasafe/issues/2636","repository_url":"https://api.github.com/repos/inasafe/inasafe","labels_url":"https://api.github.com/repos/inasafe/inasafe/issues/2636/labels{/name}","comments_url":"https://api.github.com/repos/inasafe/inasafe/issues/2636/comments","events_url":"https://api.github.com/repos/inasafe/inasafe/issues/2636/events","html_url":"https://github.com/inasafe/inasafe/issues/2636","id":135265544,"number":2636,"title":"Python error when adding a WMS","user":{"login":"Gustry","id":1609292,"avatar_url":"https://avatars.githubusercontent.com/u/1609292?v=3","gravatar_id":"","url":"https://api.github.com/users/Gustry","html_url":"https://github.com/Gustry","followers_url":"https://api.github.com/users/Gustry/followers","following_url":"https://api.github.com/users/Gustry/following{/other_user}","gists_url":"https://api.github.com/users/Gustry/gists{/gist_id}","starred_url":"https://api.github.com/users/Gustry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gustry/subscriptions","organizations_url":"https://api.github.com/users/Gustry/orgs","repos_url":"https://api.github.com/users/Gustry/repos","events_url":"https://api.github.com/users/Gustry/events{/privacy}","received_events_url":"https://api.github.com/users/Gustry/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/inasafe/inasafe/labels/Bug","name":"Bug","color":"f7c6c7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-02-21T21:59:14Z","updated_at":"2016-02-21T21:59:14Z","closed_at":null,"body":"# Problem\r\nWhen I add a WMS layer, InaSAFE throws an exception : \r\n```\r\nProgrammingError: You must not use 8-bit bytestrings unless you use a text_factory that can interpret 8-bit bytestrings (like text_factory = str). It is highly recommended that you instead just switch your application to Unicode strings. \r\nTraceback (most recent call last):\r\n  File \"/home/etienne/.qgis2/python/plugins/inasafe/safe/gui/widgets/dock.py\", line 848, in update_layer_name\r\n    self.keyword_io.update_keywords(layer, {'title': name})\r\n  File \"/home/etienne/.qgis2/python/plugins/inasafe/safe/utilities/keyword_io.py\", line 296, in update_keywords\r\n    self.write_keywords(layer, existing_keywords)\r\n  File \"/home/etienne/.qgis2/python/plugins/inasafe/safe/utilities/keyword_io.py\", line 262, in write_keywords\r\n    raise e\r\nProgrammingError: You must not use 8-bit bytestrings unless you use a text_factory that can interpret 8-bit bytestrings (like text_factory = str). It is highly recommended that you instead just switch your application to Unicode strings.\r\n```\r\n\r\nJust for information, this is my layer source : \r\n`contextualWMSLegend=0&crs=EPSG:4326&dpiMode=7&featureCount=10&format=image/jpeg&layers=Roads&styles=default&url=http://127.0.0.1/qgisltr?MAP%3Dtest.qgs`"}}