{"action":"created","issue":{"url":"https://api.github.com/repos/fpietka/rds-pgbadger/issues/2","repository_url":"https://api.github.com/repos/fpietka/rds-pgbadger","labels_url":"https://api.github.com/repos/fpietka/rds-pgbadger/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/fpietka/rds-pgbadger/issues/2/comments","events_url":"https://api.github.com/repos/fpietka/rds-pgbadger/issues/2/events","html_url":"https://github.com/fpietka/rds-pgbadger/issues/2","id":187364568,"number":2,"title":"TypeError: 'in <string>' requires string as left operand, not NoneType","user":{"login":"gauravphoenix","id":627662,"avatar_url":"https://avatars.githubusercontent.com/u/627662?v=3","gravatar_id":"","url":"https://api.github.com/users/gauravphoenix","html_url":"https://github.com/gauravphoenix","followers_url":"https://api.github.com/users/gauravphoenix/followers","following_url":"https://api.github.com/users/gauravphoenix/following{/other_user}","gists_url":"https://api.github.com/users/gauravphoenix/gists{/gist_id}","starred_url":"https://api.github.com/users/gauravphoenix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gauravphoenix/subscriptions","organizations_url":"https://api.github.com/users/gauravphoenix/orgs","repos_url":"https://api.github.com/users/gauravphoenix/repos","events_url":"https://api.github.com/users/gauravphoenix/events{/privacy}","received_events_url":"https://api.github.com/users/gauravphoenix/received_events","type":"User","site_admin":false},"labels":[{"id":459875466,"url":"https://api.github.com/repos/fpietka/rds-pgbadger/labels/bug","name":"bug","color":"ee0701","default":true}],"state":"open","locked":false,"assignee":{"login":"fpietka","id":150428,"avatar_url":"https://avatars.githubusercontent.com/u/150428?v=3","gravatar_id":"","url":"https://api.github.com/users/fpietka","html_url":"https://github.com/fpietka","followers_url":"https://api.github.com/users/fpietka/followers","following_url":"https://api.github.com/users/fpietka/following{/other_user}","gists_url":"https://api.github.com/users/fpietka/gists{/gist_id}","starred_url":"https://api.github.com/users/fpietka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fpietka/subscriptions","organizations_url":"https://api.github.com/users/fpietka/orgs","repos_url":"https://api.github.com/users/fpietka/repos","events_url":"https://api.github.com/users/fpietka/events{/privacy}","received_events_url":"https://api.github.com/users/fpietka/received_events","type":"User","site_admin":false},"assignees":[{"login":"fpietka","id":150428,"avatar_url":"https://avatars.githubusercontent.com/u/150428?v=3","gravatar_id":"","url":"https://api.github.com/users/fpietka","html_url":"https://github.com/fpietka","followers_url":"https://api.github.com/users/fpietka/followers","following_url":"https://api.github.com/users/fpietka/following{/other_user}","gists_url":"https://api.github.com/users/fpietka/gists{/gist_id}","starred_url":"https://api.github.com/users/fpietka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fpietka/subscriptions","organizations_url":"https://api.github.com/users/fpietka/orgs","repos_url":"https://api.github.com/users/fpietka/repos","events_url":"https://api.github.com/users/fpietka/events{/privacy}","received_events_url":"https://api.github.com/users/fpietka/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2016-11-04T15:33:40Z","updated_at":"2016-11-04T17:00:06Z","closed_at":null,"body":"I am running command \"rds-pgbadger my-db-instance\" but getting following exception- \r\n\r\n```\r\n016-11-04 08:29:36,529 :: INFO :: Getting all logs\r\nTraceback (most recent call last):\r\n  File \"/usr/local/bin/rds-pgbadger\", line 9, in <module>\r\n    load_entry_point('rdspgbadger==1.0.2', 'console_scripts', 'rds-pgbadger')()\r\n  File \"/Library/Python/2.7/site-packages/package/rdspgbadger.py\", line 117, in main\r\n    get_all_logs(args.instance, args.output, args.date, args.region)\r\n  File \"/Library/Python/2.7/site-packages/package/rdspgbadger.py\", line 84, in get_all_logs\r\n    for log in (name for name in response.get(\"DescribeDBLogFiles\")\r\n  File \"/Library/Python/2.7/site-packages/package/rdspgbadger.py\", line 85, in <genexpr>\r\n    if date in name[\"LogFileName\"]):\r\nTypeError: 'in <string>' requires string as left operand, not NoneType\r\n```\r\n\r\nIt would seem that the error is due to missing region but my `~/.aws/config` looks like this- \r\n\r\n```\r\n[default]\r\nregion = us-east-1\r\noutput = json\r\n```\r\n\r\n\r\nPython version - \r\n\r\n```\r\nPython 2.7.10 (default, Jul 30 2016, 18:31:42)\r\n[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.34)] on darwin\r\n```"},"comment":{"url":"https://api.github.com/repos/fpietka/rds-pgbadger/issues/comments/258488471","html_url":"https://github.com/fpietka/rds-pgbadger/issues/2#issuecomment-258488471","issue_url":"https://api.github.com/repos/fpietka/rds-pgbadger/issues/2","id":258488471,"user":{"login":"fpietka","id":150428,"avatar_url":"https://avatars.githubusercontent.com/u/150428?v=3","gravatar_id":"","url":"https://api.github.com/users/fpietka","html_url":"https://github.com/fpietka","followers_url":"https://api.github.com/users/fpietka/followers","following_url":"https://api.github.com/users/fpietka/following{/other_user}","gists_url":"https://api.github.com/users/fpietka/gists{/gist_id}","starred_url":"https://api.github.com/users/fpietka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fpietka/subscriptions","organizations_url":"https://api.github.com/users/fpietka/orgs","repos_url":"https://api.github.com/users/fpietka/repos","events_url":"https://api.github.com/users/fpietka/events{/privacy}","received_events_url":"https://api.github.com/users/fpietka/received_events","type":"User","site_admin":false},"created_at":"2016-11-04T17:00:06Z","updated_at":"2016-11-04T17:00:06Z","body":"It seems `response.get(\"DescribeDBLogFiles\")` can miss the `LogFileName` key in its items.\r\n\r\nWould it be possible for you to edit your file `/Library/Python/2.7/site-packages/package/rdspgbadger.py` and add the following after line `83`:\r\n```python\r\nprint(response.get(\"DescribeDBLogFiles\"))\r\n```\r\nThen give me the output in the issue?\r\n\r\nWhat I can tell from that is I can skip log files that don't have a name, but if I could see your use case, I might come up with a better solution."}}
{"actor":{"display_login":"fpietka"}}