{"action":"created","issue":{"url":"https://api.github.com/repos/getupcloud/python-mailgunlog/issues/1","repository_url":"https://api.github.com/repos/getupcloud/python-mailgunlog","labels_url":"https://api.github.com/repos/getupcloud/python-mailgunlog/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/getupcloud/python-mailgunlog/issues/1/comments","events_url":"https://api.github.com/repos/getupcloud/python-mailgunlog/issues/1/events","html_url":"https://github.com/getupcloud/python-mailgunlog/issues/1","id":122855009,"number":1,"title":"Error: No JSON object could be decoded","user":{"login":"jareis","id":669619,"avatar_url":"https://avatars.githubusercontent.com/u/669619?v=3","gravatar_id":"","url":"https://api.github.com/users/jareis","html_url":"https://github.com/jareis","followers_url":"https://api.github.com/users/jareis/followers","following_url":"https://api.github.com/users/jareis/following{/other_user}","gists_url":"https://api.github.com/users/jareis/gists{/gist_id}","starred_url":"https://api.github.com/users/jareis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jareis/subscriptions","organizations_url":"https://api.github.com/users/jareis/orgs","repos_url":"https://api.github.com/users/jareis/repos","events_url":"https://api.github.com/users/jareis/events{/privacy}","received_events_url":"https://api.github.com/users/jareis/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-18T00:57:30Z","updated_at":"2016-02-12T19:22:17Z","closed_at":null,"body":"Hello,\r\n\r\nThere is something wrong with the request \r\n```\r\nmailgunlog -d 2 -v samples.mailgun.org key-3ax6xnjp29jd6fds4gc373sgvjxteol0\r\n# BEGIN DATE: Wed, 16 Dec 2015 00:00:00 -0000\r\n# END DATE: Fri, 18 Dec 2015 23:59:59 -0000\r\nTraceback (most recent call last):\r\n  File \"/usr/local/bin/mailgunlog\", line 11, in <module>\r\n    sys.exit(main())\r\n  File \"/Library/Python/2.7/site-packages/mailgunlog/mailgunlog.py\", line 150, in main\r\n    for log in logs(domain=domain, api_key=api_key, begin=begin, end=end):\r\n  File \"/Library/Python/2.7/site-packages/mailgunlog/mailgunlog.py\", line 27, in logs\r\n    data = req.json()\r\n  File \"/Library/Python/2.7/site-packages/requests/models.py\", line 805, in json\r\n    return complexjson.loads(self.text, **kwargs)\r\n  File \"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py\", line 338, in loads\r\n    return _default_decoder.decode(s)\r\n  File \"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py\", line 366, in decode\r\n    obj, end = self.raw_decode(s, idx=_w(s, 0).end())\r\n  File \"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py\", line 384, in raw_decode\r\n    raise ValueError(\"No JSON object could be decoded\")\r\nValueError: No JSON object could be decoded\r\n```\r\n\r\nif making a browser request (or cURL) to\r\n```\r\nhttps://api:key-3ax6xnjp29jd6fds4gc373sgvjxteol0@api.mailgun.net/v3/samples.mailgun.org/log\r\n```\r\nworks fine."},"comment":{"url":"https://api.github.com/repos/getupcloud/python-mailgunlog/issues/comments/183456624","html_url":"https://github.com/getupcloud/python-mailgunlog/issues/1#issuecomment-183456624","issue_url":"https://api.github.com/repos/getupcloud/python-mailgunlog/issues/1","id":183456624,"user":{"login":"caruccio","id":540936,"avatar_url":"https://avatars.githubusercontent.com/u/540936?v=3","gravatar_id":"","url":"https://api.github.com/users/caruccio","html_url":"https://github.com/caruccio","followers_url":"https://api.github.com/users/caruccio/followers","following_url":"https://api.github.com/users/caruccio/following{/other_user}","gists_url":"https://api.github.com/users/caruccio/gists{/gist_id}","starred_url":"https://api.github.com/users/caruccio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caruccio/subscriptions","organizations_url":"https://api.github.com/users/caruccio/orgs","repos_url":"https://api.github.com/users/caruccio/repos","events_url":"https://api.github.com/users/caruccio/events{/privacy}","received_events_url":"https://api.github.com/users/caruccio/received_events","type":"User","site_admin":false},"created_at":"2016-02-12T19:22:17Z","updated_at":"2016-02-12T19:22:17Z","body":"Sorry for the late response. Github simply doesn't send notifications anymore to my email, even I'm subscribing to this repo.\r\n\r\nThe problem was fixed. Also, some minor additions:\r\n- python3 support\r\n- new flag -V|--version\r\n- Now -v|--verbose prints request url and response status code\r\n\r\nPlease see if it's working for you now."}}