{"action":"created","issue":{"url":"https://api.github.com/repos/pndurette/gTTS/issues/137","repository_url":"https://api.github.com/repos/pndurette/gTTS","labels_url":"https://api.github.com/repos/pndurette/gTTS/issues/137/labels{/name}","comments_url":"https://api.github.com/repos/pndurette/gTTS/issues/137/comments","events_url":"https://api.github.com/repos/pndurette/gTTS/issues/137/events","html_url":"https://github.com/pndurette/gTTS/issues/137","id":362450344,"node_id":"MDU6SXNzdWUzNjI0NTAzNDQ=","number":137,"title":"Token: regexp never finds anything","user":{"login":"tdi-odoo","id":21679113,"node_id":"MDQ6VXNlcjIxNjc5MTEz","avatar_url":"https://avatars3.githubusercontent.com/u/21679113?v=4","gravatar_id":"","url":"https://api.github.com/users/tdi-odoo","html_url":"https://github.com/tdi-odoo","followers_url":"https://api.github.com/users/tdi-odoo/followers","following_url":"https://api.github.com/users/tdi-odoo/following{/other_user}","gists_url":"https://api.github.com/users/tdi-odoo/gists{/gist_id}","starred_url":"https://api.github.com/users/tdi-odoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tdi-odoo/subscriptions","organizations_url":"https://api.github.com/users/tdi-odoo/orgs","repos_url":"https://api.github.com/users/tdi-odoo/repos","events_url":"https://api.github.com/users/tdi-odoo/events{/privacy}","received_events_url":"https://api.github.com/users/tdi-odoo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":12,"created_at":"2018-09-21T04:18:58Z","updated_at":"2018-09-21T16:13:46Z","closed_at":null,"author_association":"NONE","body":"Hello,\r\n\r\nI know the code yielding this error is not in this repository but the gtts-token repository seems inactive...\r\n\r\nSince a few hours ago it seems that  one of the regular expressions when searching \"TKK='integer.integer';\" in Google Translate HTTP response doesn't find anything. \r\n\r\nHere is my Traceback:\r\n\r\n```\r\ngtts-cli 'hello' --output hello.mp3\r\nTraceback (most recent call last):\r\n  File \"/usr/local/bin/gtts-cli\", line 9, in <module>\r\n    load_entry_point('gTTS==2.0.1', 'console_scripts', 'gtts-cli')()\r\n  File \"/usr/local/lib/python2.7/dist-packages/click/core.py\", line 722, in __call__\r\n    return self.main(*args, **kwargs)\r\n  File \"/usr/local/lib/python2.7/dist-packages/click/core.py\", line 697, in main\r\n    rv = self.invoke(ctx)\r\n  File \"/usr/local/lib/python2.7/dist-packages/click/core.py\", line 895, in invoke\r\n    return ctx.invoke(self.callback, **ctx.params)\r\n  File \"/usr/local/lib/python2.7/dist-packages/click/core.py\", line 535, in invoke\r\n    return callback(*args, **kwargs)\r\n  File \"/usr/local/lib/python2.7/dist-packages/gtts/cli.py\", line 194, in tts_cli\r\n    tts.write_to_fp(output)\r\n  File \"/usr/local/lib/python2.7/dist-packages/gtts/tts.py\", line 187, in write_to_fp\r\n    part_tk = self.token.calculate_token(part)\r\n  File \"/usr/local/lib/python2.7/dist-packages/gtts_token/gtts_token.py\", line 28, in calculate_token\r\n    seed = self._get_token_key()\r\n  File \"/usr/local/lib/python2.7/dist-packages/gtts_token/gtts_token.py\", line 62, in _get_token_key\r\n    a = re.search(\"a\\\\\\\\x3d(-?\\d+);\", tkk_expr).group(1)\r\nAttributeError: 'NoneType' object has no attribute 'group'\r\n```\r\n\r\nIs it possible this is caused by a modification in Google Translate HTTP response? I tried with other google translate python apps and they also fail to find the token...\r\n\r\nBest regards,\r\nThomas"},"comment":{"url":"https://api.github.com/repos/pndurette/gTTS/issues/comments/423590042","html_url":"https://github.com/pndurette/gTTS/issues/137#issuecomment-423590042","issue_url":"https://api.github.com/repos/pndurette/gTTS/issues/137","id":423590042,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMzU5MDA0Mg==","user":{"login":"ggqq12356","id":19667386,"node_id":"MDQ6VXNlcjE5NjY3Mzg2","avatar_url":"https://avatars2.githubusercontent.com/u/19667386?v=4","gravatar_id":"","url":"https://api.github.com/users/ggqq12356","html_url":"https://github.com/ggqq12356","followers_url":"https://api.github.com/users/ggqq12356/followers","following_url":"https://api.github.com/users/ggqq12356/following{/other_user}","gists_url":"https://api.github.com/users/ggqq12356/gists{/gist_id}","starred_url":"https://api.github.com/users/ggqq12356/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ggqq12356/subscriptions","organizations_url":"https://api.github.com/users/ggqq12356/orgs","repos_url":"https://api.github.com/users/ggqq12356/repos","events_url":"https://api.github.com/users/ggqq12356/events{/privacy}","received_events_url":"https://api.github.com/users/ggqq12356/received_events","type":"User","site_admin":false},"created_at":"2018-09-21T16:13:46Z","updated_at":"2018-09-21T16:13:46Z","author_association":"NONE","body":"i have same problem today <br>\r\n\r\n**[My solution]**<br><br>\r\nI checked the code of line 64, in gtts_token.py\r\n\r\nand i try to print(a), but it show a None type\r\n\r\nso i repair that bug in line 64:\r\n\r\n`# bug`<br>\r\n`# a = re.search(“a\\\\\\\\x3d(-?\\d+);”, tkk_expr).group(1)`<br>\r\n`# b = re.search(“b\\\\\\\\x3d(-?\\d+);”, tkk_expr).group(1)`<br>\r\n\r\n`# debug`<br>\r\n`tkk = tkk_expr.replace(“\\’”, “”).split(“;”)[0].split(“=”)[1]`<br>\r\n`a = tkk.split(“.”)[0]`<br>\r\n`b = tkk.split(“.”)[1]`<br>\r\n— — — — — — — — — — — — — — — — — — — — — — — — — — — —\r\nand it’s work~"}}
{"actor":{"display_login":"ggqq12356"}}