{"action":"closed","issue":{"url":"https://api.github.com/repos/ansible/ansible/issues/46994","repository_url":"https://api.github.com/repos/ansible/ansible","labels_url":"https://api.github.com/repos/ansible/ansible/issues/46994/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/46994/comments","events_url":"https://api.github.com/repos/ansible/ansible/issues/46994/events","html_url":"https://github.com/ansible/ansible/issues/46994","id":369743999,"node_id":"MDU6SXNzdWUzNjk3NDM5OTk=","number":46994,"title":"flatpak_remote throws exception","user":{"login":"jobevers","id":2380127,"node_id":"MDQ6VXNlcjIzODAxMjc=","avatar_url":"https://avatars2.githubusercontent.com/u/2380127?v=4","gravatar_id":"","url":"https://api.github.com/users/jobevers","html_url":"https://github.com/jobevers","followers_url":"https://api.github.com/users/jobevers/followers","following_url":"https://api.github.com/users/jobevers/following{/other_user}","gists_url":"https://api.github.com/users/jobevers/gists{/gist_id}","starred_url":"https://api.github.com/users/jobevers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jobevers/subscriptions","organizations_url":"https://api.github.com/users/jobevers/orgs","repos_url":"https://api.github.com/users/jobevers/repos","events_url":"https://api.github.com/users/jobevers/events{/privacy}","received_events_url":"https://api.github.com/users/jobevers/received_events","type":"User","site_admin":false},"labels":[{"id":1043397454,"node_id":"MDU6TGFiZWwxMDQzMzk3NDU0","url":"https://api.github.com/repos/ansible/ansible/labels/affects_2.8","name":"affects_2.8","color":"ededed","default":false},{"id":785271699,"node_id":"MDU6TGFiZWw3ODUyNzE2OTk=","url":"https://api.github.com/repos/ansible/ansible/labels/bug","name":"bug","color":"fbca04","default":true},{"id":496359346,"node_id":"MDU6TGFiZWw0OTYzNTkzNDY=","url":"https://api.github.com/repos/ansible/ansible/labels/module","name":"module","color":"1d76db","default":false},{"id":632871029,"node_id":"MDU6TGFiZWw2MzI4NzEwMjk=","url":"https://api.github.com/repos/ansible/ansible/labels/needs_maintainer","name":"needs_maintainer","color":"fef2c0","default":false},{"id":383076471,"node_id":"MDU6TGFiZWwzODMwNzY0NzE=","url":"https://api.github.com/repos/ansible/ansible/labels/python3","name":"python3","color":"fbca04","default":false},{"id":636327968,"node_id":"MDU6TGFiZWw2MzYzMjc5Njg=","url":"https://api.github.com/repos/ansible/ansible/labels/support:community","name":"support:community","color":"ededed","default":false},{"id":942378949,"node_id":"MDU6TGFiZWw5NDIzNzg5NDk=","url":"https://api.github.com/repos/ansible/ansible/labels/traceback","name":"traceback","color":"ededed","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-10-12T23:47:53Z","updated_at":"2018-11-05T15:00:44Z","closed_at":"2018-11-05T15:00:44Z","author_association":"CONTRIBUTOR","body":"<!--- Verify first that your issue is not already reported on GitHub -->\r\n<!--- Also test if the latest release and devel branch are affected too -->\r\n<!--- Complete *all* sections as described, this form is processed automatically -->\r\n\r\n##### SUMMARY\r\n```\r\nTASK [gimp : Add the flathub repo] ***********************************************************************************************************************************************************************\r\nAn exception occurred during task execution. To see the full traceback, use -vvv. The error was: TypeError: str() takes at most 1 argument (2 given)\r\nfatal: [localhost]: FAILED! => {\"changed\": false, \"module_stderr\": \"Traceback (most recent call last):\\n  File \\\"/home/jobevers/.ansible/tmp/ansible-tmp-1539386922.9-194125817113373/AnsiballZ_flatpak_remote.py\\\", line 113, in <module>\\n    _ansiballz_main()\\n  File \\\"/home/jobevers/.ansible/tmp/ansible-tmp-1539386922.9-194125817113373/AnsiballZ_flatpak_remote.py\\\", line 105, in _ansiballz_main\\n    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\\n  File \\\"/home/jobevers/.ansible/tmp/ansible-tmp-1539386922.9-194125817113373/AnsiballZ_flatpak_remote.py\\\", line 48, in invoke_module\\n    imp.load_module('__main__', mod, module, MOD_DESC)\\n  File \\\"/tmp/ansible_flatpak_remote_payload_W2AKIh/__main__.py\\\", line 219, in <module>\\n  File \\\"/tmp/ansible_flatpak_remote_payload_W2AKIh/__main__.py\\\", line 208, in main\\nTypeError: str() takes at most 1 argument (2 given)\\n\", \"module_stdout\": \"\", \"msg\": \"MODULE FAILURE\\nSee stdout/stderr for the exact error\", \"rc\": 1}\r\n```\r\n\r\nThis looks to be caused by this line: https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/packaging/os/flatpak_remote.py#L208\r\n\r\nwhich works in python3, but not python2:\r\n\r\n```\r\n~ » python2                                                                                                                                                                                           \r\n>>> bytes('test', 'utf-8')\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 1, in <module>\r\nTypeError: str() takes at most 1 argument (2 given)\r\n>>> ^D\r\n~ » python3                                                                                                                                                                                           \r\n>>> bytes('test', 'utf-8')\r\nb'test'\r\n```\r\n\r\n##### ISSUE TYPE\r\n- Bug Report\r\n\r\n##### COMPONENT NAME\r\nflatpak_remote\r\n\r\n##### ANSIBLE VERSION\r\n```\r\nansible 2.8.0.dev0 (devel 6e2897647c) last updated 2018/10/12 19:24:51 (GMT -400)\r\n  config file = None\r\n  configured module search path = [u'/home/jobevers/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']\r\n  ansible python module location = /home/jobevers/code/ansible/lib/ansible\r\n  executable location = /home/jobevers/.local/bin/ansible\r\n  python version = 2.7.12 (default, Dec  4 2017, 14:50:18) [GCC 5.4.0 20160609]\r\n```\r\n\r\n##### CONFIGURATION\r\n\"ansible-config dump --only-changed\"  produced no output\r\n"}}
{"actor":{"display_login":"bcoca"}}