Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KeyError: 'timestamp' #208

Closed
rorysavage77 opened this issue Sep 9, 2016 · 2 comments
Closed

KeyError: 'timestamp' #208

rorysavage77 opened this issue Sep 9, 2016 · 2 comments
Milestone

Comments

@rorysavage77
Copy link

Hello-

I am receiving an error when I run awslimitchecker without --skip-ta or to use -u

awslimitchecker -l -r us-east-1 -S EBS

awslimitchecker 0.5.0 is AGPL-licensed free software; all users have a right to the full source code of this version. See https://github.com/jantman/awslimitchecker
Traceback (most recent call last):
File "/bin/awslimitchecker", line 11, in
sys.exit(console_entry_point())
File "/usr/lib/python2.7/site-packages/awslimitchecker/runner.py", line 357, in console_entry_point
r.console_entry_point()
File "/usr/lib/python2.7/site-packages/awslimitchecker/runner.py", line 339, in console_entry_point
self.list_limits()
File "/usr/lib/python2.7/site-packages/awslimitchecker/runner.py", line 178, in list_limits
service=self.service_name)
File "/usr/lib/python2.7/site-packages/awslimitchecker/checker.py", line 179, in get_limits
self.ta.update_limits()
File "/usr/lib/python2.7/site-packages/awslimitchecker/trustedadvisor.py", line 117, in update_limits
ta_results = self._poll()
File "/usr/lib/python2.7/site-packages/awslimitchecker/trustedadvisor.py", line 152, in _poll
check_datetime = parser.parse(checks['result']['timestamp'])
KeyError: 'timestamp'

This works:

awslimitchecker -l -r us-east-1 -S EBS --skip-ta

awslimitchecker 0.5.0 is AGPL-licensed free software; all users have a right to the full source code of this version. See https://github.com/jantman/awslimitchecker
EBS/Active snapshots 10000
EBS/Active volumes 5000
EBS/Cold (HDD) volume storage (GiB) 20480
EBS/General Purpose (SSD) volume storage (GiB) 20480
EBS/Magnetic volume storage (GiB) 20480
EBS/Provisioned IOPS 40000
EBS/Provisioned IOPS (SSD) storage (GiB) 20480
EBS/Throughput Optimized (HDD) volume storage (GiB) 20480

@jantman
Copy link
Owner

jantman commented Sep 10, 2016

@rcsavage My gut reaction to this is that AWS made changes to the Trusted Advisor API/responses again, without changing the API version or announcing it.

A very similar thing happened back in March - see 0.3.2 release notes and #155, and also happened in July ( #195 )

The docs for DescribeTrustedAdvisorCheckResult and the TrustedAdvisorCheckResult response data element clearly show the "timestamp" key as an element that should be in the response and is not optional.

This should be a relatively quick fix, but I have family in town this weekend and might not be able to get to it until Monday or Tuesday. Sorry.

@jantman jantman modified the milestone: 0.5.1 Sep 10, 2016
jantman added a commit that referenced this issue Sep 25, 2016
@jantman jantman closed this as completed Sep 25, 2016
@jantman
Copy link
Owner

jantman commented Sep 25, 2016

@rcsavage sorry for the delay; this is now released in 0.5.1 and live on PyPI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants