{"action":"opened","issue":{"url":"https://api.github.com/repos/ansible/ansible/issues/43730","repository_url":"https://api.github.com/repos/ansible/ansible","labels_url":"https://api.github.com/repos/ansible/ansible/issues/43730/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/43730/comments","events_url":"https://api.github.com/repos/ansible/ansible/issues/43730/events","html_url":"https://github.com/ansible/ansible/issues/43730","id":348041046,"node_id":"MDU6SXNzdWUzNDgwNDEwNDY=","number":43730,"title":"Unable to use ansible-galaxy login with python3","user":{"login":"umeboshi2","id":2925698,"node_id":"MDQ6VXNlcjI5MjU2OTg=","avatar_url":"https://avatars1.githubusercontent.com/u/2925698?v=4","gravatar_id":"","url":"https://api.github.com/users/umeboshi2","html_url":"https://github.com/umeboshi2","followers_url":"https://api.github.com/users/umeboshi2/followers","following_url":"https://api.github.com/users/umeboshi2/following{/other_user}","gists_url":"https://api.github.com/users/umeboshi2/gists{/gist_id}","starred_url":"https://api.github.com/users/umeboshi2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/umeboshi2/subscriptions","organizations_url":"https://api.github.com/users/umeboshi2/orgs","repos_url":"https://api.github.com/users/umeboshi2/repos","events_url":"https://api.github.com/users/umeboshi2/events{/privacy}","received_events_url":"https://api.github.com/users/umeboshi2/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-06T18:51:15Z","updated_at":"2018-08-06T18:51:15Z","closed_at":null,"author_association":"NONE","body":"<!---\r\nVerify first that your issue/request is not already reported on GitHub.\r\nTHIS FORM WILL BE READ BY A MACHINE, COMPLETE ALL SECTIONS AS DESCRIBED.\r\nAlso test if the latest release, and devel branch are affected too.\r\nALWAYS add information AFTER (OUTSIDE) these html comments.\r\nOtherwise it may end up being automatically closed by our bot. -->\r\n\r\n##### SUMMARY\r\n<!--- Explain the problem briefly -->\r\nUsing ```ansible-galaxy login``` with python3 gives me this error:\r\n```ERROR! Unexpected Exception, this is probably a bug: the JSON object must be str, not 'bytes'```\r\n\r\n\r\n##### ISSUE TYPE\r\n - Bug Report\r\n\r\n##### COMPONENT NAME\r\n<!--- Insert, BELOW THIS COMMENT, the name of the module, plugin, task or feature.\r\nDo not include extra details here, e.g. \"vyos_command\" not \"the network module vyos_command\" or the full path-->\r\nansible-galaxy\r\n\r\n\r\n##### ANSIBLE VERSION\r\n<!--- Paste, BELOW THIS COMMENT, verbatim output from \"ansible --version\" between quotes below -->\r\n```\r\nansible 2.6.1\r\n  config file = /freespace/home/umeboshi/workspace/Toys/ansible.cfg\r\n  configured module search path = ['/freespace/home/umeboshi/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']\r\n  ansible python module location = /freespace/home/umeboshi/.local/lib/python3.5/site-packages/ansible\r\n  executable location = /freespace/home/umeboshi/.local/bin/ansible\r\n  python version = 3.5.3 (default, Jan 19 2017, 14:11:04) [GCC 6.3.0 20170118]\r\n\r\n```\r\n\r\n##### CONFIGURATION\r\n<!--- If using Ansible 2.4 or above, paste, BELOW THIS COMMENT, the results of \"ansible-config dump --only-changed\"\r\nOtherwise, mention any settings you have changed/added/removed in ansible.cfg\r\n(or using the ANSIBLE_* environment variables).-->\r\nDEFAULT_HOST_LIST(/freespace/home/umeboshi/workspace/Toys/ansible.cfg) = ['/freespace/home/umeboshi/workspace/Toys/ansible/inventory/hosts']\r\nDEFAULT_ROLES_PATH(env: ANSIBLE_ROLES_PATH) = ['/freespace/home/umeboshi/local/roles']\r\n\r\n##### OS / ENVIRONMENT\r\n<!--- Mention, BELOW THIS COMMENT, the OS you are running Ansible from, and the OS you are\r\nmanaging, or say \"N/A\" for anything that is not platform-specific.\r\nAlso mention the specific version of what you are trying to control,\r\ne.g. if this is a network bug the version of firmware on the network device.-->\r\ndebian stable python3\r\n\r\nIn debian, pip defaults to using ```~/.local``` and I have placed python3 there to prepare for EOL of python2.  Ansible is installed in ~/.local and is using python3.\r\n\r\n\r\n\r\n##### STEPS TO REPRODUCE\r\n<!--- For bugs, show exactly how to reproduce the problem, using a minimal test-case.\r\nFor new features, show how the feature would be used. -->\r\n\r\n<!--- Paste example playbooks or commands between quotes below -->\r\n```yaml\r\n\r\n```\r\n\r\n<!--- You can also paste gist.github.com links for larger files -->\r\n\r\n##### EXPECTED RESULTS\r\n<!--- What did you expect to happen when running the steps above? -->\r\nlogin to ansible galaxy\r\n\r\n##### ACTUAL RESULTS\r\n<!--- What actually happened? If possible run with extra verbosity (-vvvv) -->\r\n\r\n<!--- Paste verbatim command output between quotes below -->\r\n```\r\nGithub Username: umeboshi2\r\nPassword for umeboshi2: \r\nERROR! Unexpected Exception, this is probably a bug: the JSON object must be str, not 'bytes'\r\nthe full traceback was:\r\n\r\nTraceback (most recent call last):\r\n  File \"/freespace/home/umeboshi/.local/bin/ansible-galaxy\", line 118, in <module>\r\n    exit_code = cli.run()\r\n  File \"/freespace/home/umeboshi/.local/lib/python3.5/site-packages/ansible/cli/galaxy.py\", line 152, in run\r\n    self.execute()\r\n  File \"/freespace/home/umeboshi/.local/lib/python3.5/site-packages/ansible/cli/__init__.py\", line 155, in execute\r\n    fn()\r\n  File \"/freespace/home/umeboshi/.local/lib/python3.5/site-packages/ansible/cli/galaxy.py\", line 560, in execute_login\r\n    github_token = login.create_github_token()\r\n  File \"/freespace/home/umeboshi/.local/lib/python3.5/site-packages/ansible/galaxy/login.py\", line 103, in create_github_token\r\n    self.remove_github_token()\r\n  File \"/freespace/home/umeboshi/.local/lib/python3.5/site-packages/ansible/galaxy/login.py\", line 84, in remove_github_token\r\n    url_password=self.github_password, force_basic_auth=True,))\r\n  File \"/usr/lib/python3.5/json/__init__.py\", line 268, in load\r\n    parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)\r\n  File \"/usr/lib/python3.5/json/__init__.py\", line 312, in loads\r\n    s.__class__.__name__))\r\nTypeError: the JSON object must be str, not 'bytes'\r\n\r\n```\r\n"}}
{"actor":{"display_login":"umeboshi2"}}