{"action":"created","issue":{"url":"https://api.github.com/repos/tinode/chat/issues/140","repository_url":"https://api.github.com/repos/tinode/chat","labels_url":"https://api.github.com/repos/tinode/chat/issues/140/labels{/name}","comments_url":"https://api.github.com/repos/tinode/chat/issues/140/comments","events_url":"https://api.github.com/repos/tinode/chat/issues/140/events","html_url":"https://github.com/tinode/chat/issues/140","id":354626265,"node_id":"MDU6SXNzdWUzNTQ2MjYyNjU=","number":140,"title":"chatbot.py file not working in python 3.5","user":{"login":"admill1519","id":9468467,"node_id":"MDQ6VXNlcjk0Njg0Njc=","avatar_url":"https://avatars1.githubusercontent.com/u/9468467?v=4","gravatar_id":"","url":"https://api.github.com/users/admill1519","html_url":"https://github.com/admill1519","followers_url":"https://api.github.com/users/admill1519/followers","following_url":"https://api.github.com/users/admill1519/following{/other_user}","gists_url":"https://api.github.com/users/admill1519/gists{/gist_id}","starred_url":"https://api.github.com/users/admill1519/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/admill1519/subscriptions","organizations_url":"https://api.github.com/users/admill1519/orgs","repos_url":"https://api.github.com/users/admill1519/repos","events_url":"https://api.github.com/users/admill1519/events{/privacy}","received_events_url":"https://api.github.com/users/admill1519/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2018-08-28T08:34:33Z","updated_at":"2018-08-31T09:08:20Z","closed_at":"2018-08-29T18:21:10Z","author_association":"NONE","body":"### Subject of the issue\r\nDescribe your issue here.\r\n\r\n### Is this a bug report of a feature request?\r\n- [ ] Bug report\r\nit is bug report\r\n\r\n### Your environment\r\n#### Server-side\r\n- [ ] api.tinode.co\r\n- [ ] Your own setup:\r\n  * platform (Windows Linux etc)\r\n  * version of tinode server, e.g. `0.15.2-rc3`\r\n  * database backend\r\n  \r\n#### Client-side\r\n- [ ] TinodeWeb/tinodejs: javascript client\r\n  * Browser make and version.\r\n\r\n- [ ] tn-cli\r\n  * Python version 3.5\r\n- [ ] Chatbot\r\n  * Python version 3.5\r\n- Version of the client, e.g. `0.15.1`\r\n\r\n### Steps to reproduce\r\nrun chatbot.py file with python 3.5\r\n\r\n### Expected behaviour\r\nShould run chatbot file without any error.\r\n\r\n### Actual behaviour\r\nGetting following error:\r\n\r\nTraceback (most recent call last):\r\n  File \"Sony_chatbot.py\", line 751, in <module>\r\n    run(args)\r\n  File \"Sony_chatbot.py\", line 705, in run\r\n    client = init_client(args.host, schema, secret, args.login_cookie)\r\n  File \"Sony_chatbot.py\", line 168, in init_client\r\n    client_post(login(cookie_file_name, schema, secret))\r\n  File \"Sony_chatbot.py\", line 126, in login\r\n    return pb.ClientMsg(login=pb.ClientLogin(id=tid, scheme=scheme, secret=secret))\r\nTypeError: '9aanalysisbot:123' has type str, but expected one of: bytes\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/tinode/chat/issues/comments/417603127","html_url":"https://github.com/tinode/chat/issues/140#issuecomment-417603127","issue_url":"https://api.github.com/repos/tinode/chat/issues/140","id":417603127,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNzYwMzEyNw==","user":{"login":"admill1519","id":9468467,"node_id":"MDQ6VXNlcjk0Njg0Njc=","avatar_url":"https://avatars1.githubusercontent.com/u/9468467?v=4","gravatar_id":"","url":"https://api.github.com/users/admill1519","html_url":"https://github.com/admill1519","followers_url":"https://api.github.com/users/admill1519/followers","following_url":"https://api.github.com/users/admill1519/following{/other_user}","gists_url":"https://api.github.com/users/admill1519/gists{/gist_id}","starred_url":"https://api.github.com/users/admill1519/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/admill1519/subscriptions","organizations_url":"https://api.github.com/users/admill1519/orgs","repos_url":"https://api.github.com/users/admill1519/repos","events_url":"https://api.github.com/users/admill1519/events{/privacy}","received_events_url":"https://api.github.com/users/admill1519/received_events","type":"User","site_admin":false},"created_at":"2018-08-31T09:08:20Z","updated_at":"2018-08-31T09:08:20Z","author_association":"NONE","body":"Today I downloaded this repository and executed chatbot file using python 3.5.2 but getting following error. No changes in chatbot file except localhost to my tinode server ip.\r\n\r\n\r\nC:\\Users\\Amol\\Downloads\\chat-master\\chat-master\\chatbot>python chatbot.py --logi\r\nn-basic=9aflightbot:Flight@12323\r\nTino, Tinode's chatbot.\r\nLogging in with login:password 9aflightbot:Flight@12323\r\nLoaded 322 quotes\r\nTraceback (most recent call last):\r\n  File \"chatbot.py\", line 322, in <module>\r\n    run(args)\r\n  File \"chatbot.py\", line 294, in run\r\n    client_message_loop(client)\r\n  File \"chatbot.py\", line 175, in client_message_loop\r\n    exec_future(msg.ctrl.id, msg.ctrl.code, msg.ctrl.params)\r\n  File \"chatbot.py\", line 42, in exec_future\r\n    bundle.get('action')(arg, params)\r\n  File \"chatbot.py\", line 119, in <lambda>\r\n    'action': lambda fname, params: save_auth_cookie(fname, params),\r\n  File \"chatbot.py\", line 230, in save_auth_cookie\r\n    nice[key_out] = json.loads(params[key_in])\r\n  File \"C:\\Program Files\\Python35\\lib\\json\\__init__.py\", line 312, in loads\r\n    s.__class__.__name__))\r\nTypeError: the JSON object must be str, not 'bytes'\r\n"}}
{"actor":{"display_login":"admill1519"}}