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

Execution Error #3

Closed
patrickbeam opened this issue Dec 7, 2015 · 2 comments · May be fixed by #5
Closed

Execution Error #3

patrickbeam opened this issue Dec 7, 2015 · 2 comments · May be fixed by #5

Comments

@patrickbeam
Copy link

After the purchase of RI's the script starts throwing the following error.

ec2-costs us-east-1
/Users/pbeam/github/ec2-cost-tools/ec2_costs/main.py:24: Warning: Click detected the use of the unicode_literals future import. This is heavily discouraged because it can introduce subtle bugs in your code. You should instead use explicit u"" literals for your unicode strings. For more information see http://click.pocoo.org/python3/
def main(region, show_expirations=False):
Traceback (most recent call last):
File "/Users/pbeam/github/ec2-cost-tools/venv/bin/ec2-costs", line 9, in
load_entry_point('ec2-costs==0.1.0', 'console_scripts', 'ec2-costs')()
File "/Users/pbeam/github/ec2-cost-tools/venv/lib/python2.7/site-packages/click/core.py", line 700, in call
return self.main(_args, *_kwargs)
File "/Users/pbeam/github/ec2-cost-tools/venv/lib/python2.7/site-packages/click/core.py", line 680, in main
rv = self.invoke(ctx)
File "/Users/pbeam/github/ec2-cost-tools/venv/lib/python2.7/site-packages/click/core.py", line 873, in invoke
return ctx.invoke(self.callback, *_ctx.params)
File "/Users/pbeam/github/ec2-cost-tools/venv/lib/python2.7/site-packages/click/core.py", line 508, in invoke
return callback(_args, **kwargs)
File "/Users/pbeam/github/ec2-cost-tools/ec2_costs/main.py", line 43, in main
result = get_reserved_analysis(conn)
File "/Users/pbeam/github/ec2-cost-tools/ec2_costs/init.py", line 143, in get_reserved_analysis
covered_price = matched.recurring_charges[0].amount
IndexError: list index out of range

@tomchiverton
Copy link

Same here.

@AjeetK
Copy link

AjeetK commented Sep 8, 2016

The problem is with the python version, if you are using less than python 2.7 than you will get this warning.
Solution:
1> Either upgrade your python version to 2.7
2> Use virtualenv using python2.7 and than install this package after activating the virtualenv

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

Successfully merging a pull request may close this issue.

3 participants