want to get all the running instances in a AWS environment. I am using python 3.3. i had used boto.rds earlier which has a method called rds2.get_all_dbinstances(). But i am migrating now to rds2. when i try to run the above code using python interpreter usage :python2 filename.py : i get no error. the program works fine. But using Bash shell usage : ./filename.py : i get the error :
TypeError: File "/Users/heninkarkada/Documents/repositories/jaws/b.py", line 5, in
raw=con.describe_db_instances(db_instance_identifier=None)
File "/usr/local/lib/python3.4/site-packages/boto/rds2/layer1.py", line 1512, in describe_db_instances
path='/', params=params)
File "/usr/local/lib/python3.4/site-packages/boto/rds2/layer1.py", line 3764, in _make_request
return json.loads(body)
File "/usr/local/Cellar/python3/3.4.1_1/Frameworks/Python.framework/Versions/3.4/lib/python3.4/json/__init__.py", line 312, in loads
s.class.name))
TypeError: the JSON object must be str, not 'bytes'the JSON object must be str, not 'bytes' at line no:3
Can anyone tell me why this thing is happening? And is RDS2 compatible with python3 , so can you please fix this defect Advance thanks
This issue is still happening, and can be fixed by:
body = response.read().decode('utf-8')
at line 3761 of rds2/layer1.py
Any updates on this?
Still necessary and swimmadude66's fix still works, line has moved to 3774 in the meantime. Surprised this still wasn't fixed!
Most helpful comment
This issue is still happening, and can be fixed by:
body = response.read().decode('utf-8')at line 3761 of rds2/layer1.py