jasonknight / woocommerce-json-api

A simple, Abstract JSON API for Wordpress' Awesome Plugin: WooCommerce
58 stars 21 forks source link

TypeError #65

Closed danielddddddd closed 9 years ago

danielddddddd commented 9 years ago

Hi,

I'm trying to use this in Python 3.4 and am getting the following error.

>>> response = amazon.ItemSearch(Keywords="Kindle 3G", SearchIndex="All")
Traceback (most recent call last):
  File "<pyshell#6>", line 1, in <module>
    response = amazon.ItemSearch(Keywords="Kindle 3G", SearchIndex="All")
  File "C:\Python34\lib\site-packages\bottlenose\api.py", line 246, in __call__
    if "gzip" in response.info().get("Content-Encoding"):
TypeError: argument of type 'NoneType' is not iterable

I'm not sure if this is an actual bug or if it is me doing something wrong. I am using the following code:

import bottlenose

AWS_ACCESS_KEY_ID = "I've got the key"
AWS_SECRET_ACCESS_KEY = "I've got the secret"
AWS_ASSOCIATE_TAG = "I've got the tag"

amazon = bottlenose.Amazon(AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_ASSOCIATE_TAG)

response = amazon.ItemSearch(Keywords="Kindle 3G", SearchIndex="All")
print(response)

and this is pretty much the example code. Installed using pip, Python 3.4

I'm not sure if this is an IAM issue so I've checked using my root keys, and the same issue persists.

Any ideas what could be causing this?

Many thanks

(PS: yes, actual Amazon IAM credentials going in the variables)

jasonknight commented 9 years ago

Umm... This is the wrong place for Amazon AWS questions...

danielddddddd commented 9 years ago

No, you're quite right, of course. I have no idea how this ended up posted to this tracker. Too many github windows open I think. Sorry!