This repository was archived by the owner on Mar 6, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 352
This repository was archived by the owner on Mar 6, 2026. It is now read-only.
Ungraceful error None could not be converted to unicode #927
Copy link
Copy link
Closed
Labels
🚨This issue needs some love.This issue needs some love.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Description
Environment details
- OS: Ubuntu 18.04.5 LTS, running docker image based on Ubuntu 20.04
- Python version: 3.7.1
- pip version: 19.0.3
google-authversion: 1.35.0google-cloud-bigtableversion: 1.7.0google-cloud-storageversion: 1.42.3google-cloud-pubsubversion: 2.8.0
Error
Traceback (most recent call last):
File "/opt/venv/lib/python3.7/site-packages/grpc/_plugin_wrapping.py", line 90, in __call__
context, _AuthMetadataPluginCallback(callback_state, callback))
File "/opt/venv/lib/python3.7/site-packages/google/auth/transport/grpc.py", line 101, in __call__
callback(self._get_authorization_headers(context), None)
File "/opt/venv/lib/python3.7/site-packages/google/auth/transport/grpc.py", line 88, in _get_authorization_headers
self._request, context.method_name, context.service_url, headers
File "/opt/venv/lib/python3.7/site-packages/google/auth/credentials.py", line 134, in before_request
self.apply(headers)
File "/opt/venv/lib/python3.7/site-packages/google/auth/credentials.py", line 110, in apply
_helpers.from_bytes(token or self.token)
File "/opt/venv/lib/python3.7/site-packages/google/auth/_helpers.py", line 130, in from_bytes
raise ValueError("{0!r} could not be converted to unicode".format(value))
ValueError: None could not be converted to unicode
This is essentially the same error as described in this StackOverflow question.
Steps to reproduce
I'm afraid we haven't iterated enough to isolate the minimal reproducing piece of code, so at the moment we can't provide a detailed steps to reproduce with a minimal, complete, verifiable example, but we know that:
- the error happens at the start of a microservice that interacts with multiple GCP components (namely: PubSub, Storage and Bigtable)
- the error seems to have no consequence whatsoever: the microservice correctly starts and runs after that error
It would be nice if google-auth library could report a more graceful/meaningful error, then we can figure out by ourselves what we did wrong.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
🚨This issue needs some love.This issue needs some love.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.