Skip to content

MemoryError #38

@andrejmaya

Description

@andrejmaya

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions