Skip to content

AttributeError when performing Client.request #164

Closed
@gendalus

Description

@gendalus

Hi,

I'm trying to make a connection to tumblr. The code is from the pytumblr-Project:

 client = oauth.Client(self.consumer, self.token)
        try:
            client.follow_redirects = False
            resp, content = client.request(url, method="GET", redirections=False)

There's the following error:

File "/Library/Python/2.7/site-packages/oauth2/init.py", line 662, in request
req.sign_request(self.method, self.consumer, self.token)
File "/Library/Python/2.7/site-packages/oauth2/init.py", line 502, in sign_request
self['oauth_signature'] = signature_method.sign(self, consumer, token)
File "/Library/Python/2.7/site-packages/oauth2/init.py", line 838, in sign
key, raw = self.signing_base(request, consumer, token)
File "/Library/Python/2.7/site-packages/oauth2/init.py", line 830, in signing_base
key = '%s&' % escape(consumer.secret)
File "/Library/Python/2.7/site-packages/oauth2/init.py", line 158, in escape
return urllib.quote(s.encode('utf-8'), safe='~')
AttributeError: 'tuple' object has no attribute 'encode'

I've tested it with python 2.7 and 2.6. Same results. Is there anything I can do about that?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions