ValueError: Only unicode objects are escapable.
See original GitHub issueUsing requests 0.14.2 (tried 1.0.4 too and think I got the same thing) and Python 2.7.3. Getting this error when trying to make a request. Relevant part of stack trace:
File "/Users/john/.virtualenvs/dashboard/lib/python2.7/site-packages/oauthlib/oauth1/rfc5849/__init__.py", line 215, in sign
request.oauth_params.append(('oauth_signature', self.get_oauth_signature(request)))
File "/Users/john/.virtualenvs/dashboard/lib/python2.7/site-packages/oauthlib/oauth1/rfc5849/__init__.py", line 67, in get_oauth_signature
uri, headers, body = self._render(request)
File "/Users/john/.virtualenvs/dashboard/lib/python2.7/site-packages/oauthlib/oauth1/rfc5849/__init__.py", line 137, in _render
headers = parameters.prepare_headers(request.oauth_params, request.headers, realm=realm)
File "/Users/john/.virtualenvs/dashboard/lib/python2.7/site-packages/oauthlib/oauth1/rfc5849/utils.py", line 32, in wrapper
return target(params, *args, **kwargs)
File "/Users/john/.virtualenvs/dashboard/lib/python2.7/site-packages/oauthlib/oauth1/rfc5849/parameters.py", line 58, in prepare_headers
escaped_value = utils.escape(value)
File "/Users/john/.virtualenvs/dashboard/lib/python2.7/site-packages/oauthlib/oauth1/rfc5849/utils.py", line 56, in escape
raise ValueError('Only unicode objects are escapable.')
ValueError: Only unicode objects are escapable.
Issue Analytics
- State:
- Created 11 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
python - Failed to send request: Only unicode objects are ...
It looks like you are using tweepy to get sentiment from tweets. You need Twitter API credentials to do so. What this error...
Read more >Only unicode objects are escapable. · Issue #523
TweepError: Failed to send request: Only unicode objects are escapable. Got <generator object at 0xb7050cd4> of type <type 'generator'>.
Read more >python oauthlib: in escape ValueError "Only unicode objects ...
Django : python oauthlib: in escape ValueError " Only unicode objects are escapable " [ Beautify Your Computer ...
Read more >python oauthlib: in escape ValueError "Only unicode ...
I got this error when I did not provide my OAuth Consumer key and secrets in my django settings file. It's essentially a...
Read more >Frequently asked questions — OAuthLib 3.2.1 documentation
What does ValueError Only unicode objects are escapable. Got one of type X. mean?¶. OAuthLib uses unicode everywhere and when creating a OAuth...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Add this line to the top of your python module:
I encountered the same problem. The fact is that in this way:
both
resource_owner_keyandresource_owner_secretare lists containing one element each. I solved this issues simply extracting the only element present in each list