MemoryError
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 214
- Forks
- 52
- PR merge metrics
- No merged PRs in 30d
Description
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
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the offer() and _fetch_offer() entry points in awspricing/__init__.py, then reproduce the reported Python 2.7 example and inspect the requests response JSON decoding shown in the traceback. Done means determining why loading the AmazonEC2 offer raises MemoryError and establishing a verified resolution, though the issue does not specify an expected change.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cloud
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100