I am supporting an existing application that has already signed up and access to etsy, so I have the values for keys and secrets.
Recently I have just started with etsy-python and I am trying the following code (which I got most by looking through
import oauth2 as oauth
from etsy import Etsy, EtsyEnvProduction
from etsy.oauth import EtsyOAuthClient
etsy_env = EtsyEnvProduction()
oauth_client = EtsyOAuthClient(oauth_consumer_key='consumer-key',oauth_consumer_secret='consumer-secret', etsy_env=etsy_env)
oauth_client.token = oauth.Token(key='key',secret='secret')
etsy_api = Etsy(key_file='key-file',etsy_oauth_client=oauth_client, etsy_env=etsy_env)
etsy_api.ping()
all worked without errors up to the last statement where I get:
File "etsy-0.3-py2.6.egg/etsy/_core.py", line 106, in __call__
File "etsy-0.3-py2.6.egg/etsy/_core.py", line 143, in invoke
File "etsy-0.3-py2.6.egg/etsy/_core.py", line 326, in _get
File "etsy-0.3-py2.6.egg/etsy/_v2.py", line 25, in _get_url
File "etsy-0.3-py2.6.egg/etsy/oauth.py", line 43, in do_oauth_request
File "oauth2/__init__.py", line 662, in request
req.sign_request(self.method, self.consumer, self.token)
File "oauth2/__init__.py", line 493, in sign_request
self['oauth_body_hash'] = base64.b64encode(sha(self.body).digest())
TypeError: sha1() argument 1 must be string or read-only buffer, not None
any help on this will be appreciated.
also I would like to ask if there more example code on how to use etsy-python
--
George