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

MemoryError #38

Open
andrejmaya opened this issue Mar 21, 2019 · 1 comment
Open

MemoryError #38

andrejmaya opened this issue Mar 21, 2019 · 1 comment

Comments

@andrejmaya
Copy link

Hi,

my test python code is:

import awspricing

ec2_offer = awspricing.offer('AmazonEC2')

p = ec2_offer.ondemand_hourly(
  't2.micro',
  operating_system='Linux',
  region='eu-west-1'
)

print(p) # 0.0126

The output is this error message here:

[ec2-user@ip-10-0-1-224 awspricing]$ python lambda_function.py
Traceback (most recent call last):
  File "lambda_function_1.py", line 3, in <module>
    ec2_offer = awspricing.offer('AmazonEC2')
  File "/usr/lib/python2.7/site-packages/awspricing/__init__.py", line 95, in offer
    offer_data = _fetch_offer(service_name, version=version)
  File "/usr/lib/python2.7/site-packages/awspricing/__init__.py", line 83, in _fetch_offer
    offer = resp.json()
  File "/usr/lib/python2.7/site-packages/requests/models.py", line 795, in json
    return json.loads(self.content.decode(encoding), **kwargs)
  File "/usr/lib64/python2.7/encodings/utf_8.py", line 16, in decode
    return codecs.utf_8_decode(input, errors, True)
MemoryError

Please help.

@petertang2012
Copy link

petertang2012 commented Apr 26, 2019

I faced the same issue and found 32-bit python was to blame. Try this and see if helps with your issue https://stackoverflow.com/questions/11283220/memory-error-in-python#answer-37726090

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