{"action":"created","issue":{"url":"https://api.github.com/repos/adobe-apiplatform/user-sync.py/issues/357","repository_url":"https://api.github.com/repos/adobe-apiplatform/user-sync.py","labels_url":"https://api.github.com/repos/adobe-apiplatform/user-sync.py/issues/357/labels{/name}","comments_url":"https://api.github.com/repos/adobe-apiplatform/user-sync.py/issues/357/comments","events_url":"https://api.github.com/repos/adobe-apiplatform/user-sync.py/issues/357/events","html_url":"https://github.com/adobe-apiplatform/user-sync.py/issues/357","id":326919587,"number":357,"title":"Problem decoding non ASCII characters when logging at debug level","user":{"login":"tobiasbp","id":5671083,"avatar_url":"https://avatars0.githubusercontent.com/u/5671083?v=4","gravatar_id":"","url":"https://api.github.com/users/tobiasbp","html_url":"https://github.com/tobiasbp","followers_url":"https://api.github.com/users/tobiasbp/followers","following_url":"https://api.github.com/users/tobiasbp/following{/other_user}","gists_url":"https://api.github.com/users/tobiasbp/gists{/gist_id}","starred_url":"https://api.github.com/users/tobiasbp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tobiasbp/subscriptions","organizations_url":"https://api.github.com/users/tobiasbp/orgs","repos_url":"https://api.github.com/users/tobiasbp/repos","events_url":"https://api.github.com/users/tobiasbp/events{/privacy}","received_events_url":"https://api.github.com/users/tobiasbp/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-28T07:06:13Z","updated_at":"2018-05-28T07:40:55Z","closed_at":null,"author_association":"NONE","body":"When running in debug mode, I get errors when users have non ASCII characters in their names.\r\n\r\nA users non ASCII last name: 'lastname': 'Kj\\xe6rgaard'\r\n\r\n\r\n**The error as seen when logging at level debug**\r\n\r\nArguments: ('before', {'email': 'foo@example.com', 'username': 'foo@example.com', 'domain': 'example.com', 'firstname': 'foo', 'lastname': 'Kj\\xe6rgaard', 'country': None})\r\n--- Logging error ---\r\nTraceback (most recent call last):\r\n  File \"/usr/lib/python3.6/logging/__init__.py\", line 994, in emit\r\n    stream.write(msg)\r\nUnicodeEncodeError: 'ascii' codec can't encode character '\\xe6' in position 196: ordinal not in range(128)\r\nCall stack:\r\n  File \"/usr/lib/python3.6/runpy.py\", line 193, in _run_module_as_main\r\n    \"__main__\", mod_spec)\r\n  File \"/usr/lib/python3.6/runpy.py\", line 85, in _run_code\r\n    exec(code, run_globals)\r\n  File \"__main__.py\", line 25, in <module>\r\n    bootstrap_pex(__entry_point__)\r\n  File \".bootstrap/_pex/pex_bootstrapper.py\", line 170, in bootstrap_pex\r\n    pex.PEX(entry_point).execute()\r\n  File \".bootstrap/_pex/pex.py\", line 365, in execute\r\n    self._wrap_coverage(self._wrap_profiling, self._execute)\r\n  File \".bootstrap/_pex/pex.py\", line 293, in _wrap_coverage\r\n    runner(*args)\r\n  File \".bootstrap/_pex/pex.py\", line 325, in _wrap_profiling\r\n    runner(*args)\r\n  File \".bootstrap/_pex/pex.py\", line 408, in _execute\r\n    return self.execute_entry(self._pex_info.entry_point)\r\n  File \".bootstrap/_pex/pex.py\", line 466, in execute_entry\r\n    return runner(entry_point)\r\n  File \".bootstrap/_pex/pex.py\", line 471, in execute_module\r\n    runpy.run_module(module_name, run_name='__main__')\r\n  File \"/usr/lib/python3.6/runpy.py\", line 208, in run_module\r\n    return _run_code(code, {}, init_globals, run_name, mod_spec)\r\n  File \"/usr/lib/python3.6/runpy.py\", line 85, in _run_code\r\n    exec(code, run_globals)\r\n  File \"/root/.pex/install/user_sync-2.3rc4-py3-none-any.whl.1cf55a52d74f4ae2364c6225512f031f93f767bd/user_sync-2.3rc4-py3-none-any.whl/user_sync/app.py\", line 325, in <module>\r\n    main()\r\n  File \"/root/.pex/install/user_sync-2.3rc4-py3-none-any.whl.1cf55a52d74f4ae2364c6225512f031f93f767bd/user_sync-2.3rc4-py3-none-any.whl/user_sync/app.py\", line 85, in main\r\n    begin_work(config_loader)\r\n  File \"/root/.pex/install/user_sync-2.3rc4-py3-none-any.whl.1cf55a52d74f4ae2364c6225512f031f93f767bd/user_sync-2.3rc4-py3-none-any.whl/user_sync/app.py\", line 321, in begin_work\r\n    rule_processor.run(directory_groups, directory_connector, umapi_connectors)\r\n  File \"/root/.pex/install/user_sync-2.3rc4-py3-none-any.whl.1cf55a52d74f4ae2364c6225512f031f93f767bd/user_sync-2.3rc4-py3-none-any.whl/user_sync/rules.py\", line 171, in run\r\n    self.read_desired_user_groups(directory_groups, directory_connector)\r\n  File \"/root/.pex/install/user_sync-2.3rc4-py3-none-any.whl.1cf55a52d74f4ae2364c6225512f031f93f767bd/user_sync-2.3rc4-py3-none-any.whl/user_sync/rules.py\", line 375, in read_desired_user_groups\r\n    self.log_after_mapping_hook_scope(after_call=True)\r\n  File \"/root/.pex/install/user_sync-2.3rc4-py3-none-any.whl.1cf55a52d74f4ae2364c6225512f031f93f767bd/user_sync-2.3rc4-py3-none-any.whl/user_sync/rules.py\", line 1037, in log_after_mapping_hook_scope\r\n    self.logger.debug('Target attrs, %s: %s', when, self.after_mapping_hook_scope['target_attributes'])\r\n"},"comment":{"url":"https://api.github.com/repos/adobe-apiplatform/user-sync.py/issues/comments/392446389","html_url":"https://github.com/adobe-apiplatform/user-sync.py/issues/357#issuecomment-392446389","issue_url":"https://api.github.com/repos/adobe-apiplatform/user-sync.py/issues/357","id":392446389,"user":{"login":"Luci2015","id":14054859,"avatar_url":"https://avatars1.githubusercontent.com/u/14054859?v=4","gravatar_id":"","url":"https://api.github.com/users/Luci2015","html_url":"https://github.com/Luci2015","followers_url":"https://api.github.com/users/Luci2015/followers","following_url":"https://api.github.com/users/Luci2015/following{/other_user}","gists_url":"https://api.github.com/users/Luci2015/gists{/gist_id}","starred_url":"https://api.github.com/users/Luci2015/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Luci2015/subscriptions","organizations_url":"https://api.github.com/users/Luci2015/orgs","repos_url":"https://api.github.com/users/Luci2015/repos","events_url":"https://api.github.com/users/Luci2015/events{/privacy}","received_events_url":"https://api.github.com/users/Luci2015/received_events","type":"User","site_admin":false},"created_at":"2018-05-28T07:40:55Z","updated_at":"2018-05-28T07:40:55Z","author_association":"CONTRIBUTOR","body":"You must be using an older release as I'm not getting any error using v. 2.3rc4"}}
{"actor":{"display_login":"Luci2015"}}