-
Notifications
You must be signed in to change notification settings - Fork 431
broken encoding with python 3.4 (fix inside) #294
Comments
Can you do a If this hasn't already been resolved in a release, it probably will be in |
---
Metadata-Version: 1.1
Name: oauth2client
Version: 1.4.12
Summary: OAuth 2.0 client library
Home-page: http://github.com/google/oauth2client/
Author: Google Inc.
Author-email: UNKNOWN
License: Apache 2.0
Location: .../venv/lib/python3.4/site-packages
Requires: httplib2, pyasn1, pyasn1-modules, rsa, six
|
Thanks. The latest version is 1.4.12: https://pypi.python.org/pypi/oauth2client/1.4.12 If you upgrade does the problem persist? |
Found the line in the 1.4.11 release: https://github.com/google/oauth2client/blob/c61bdf4565782db82172b450284fb969150dd32b/oauth2client/client.py#L1515 |
Traced the line to the current head, still an "issue": https://github.com/google/oauth2client/blob/b66838e48da243a7fefa7275044f6b5833ec1476/oauth2client/client.py#L1632 @richiverse For now, use bytes, but your suggestion should make it into the codebase, so thanks! Easiest way (if you're reading from a file) is opening in read binary ( |
JWT Assertion constructor converts the private key to base64 so it can be stored in JSON, but base64.b64encode fails on the unicode type. Fixes googleapis#294.
context:
Changing line 1515 in oauth2client/client.py from this:
to this:
fixed my issue.
reference:
http://stackoverflow.com/questions/27160352/when-convert-to-base-64-typeerror-str-does-not-support-the-buffer-interface
The text was updated successfully, but these errors were encountered: