-
Notifications
You must be signed in to change notification settings - Fork 315
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Ungraceful error None could not be converted to unicode
#927
Comments
Reproduction script:
This is with Python 3.9.9 and the following modules installed:
This is the error:
Notes:
noise can be reduced with:
|
I confirm that I also have the same problem. Manually loading JSON tokens, as mentioned on Stackoverflow, didn't help. Similar to what @syrkuit mentioned, it fails when having multiple subscriptions, but also topics. In my case, I get the error when running contract tests as part of a test suite (i.e., I have fake clients simulating the behavior of official Publisher/Subscriber clients, and want to check that fake and official clients still behave the same). Here is how look my tests: async def test_list_subscriptions(self, subscriber):
subscriptions = await SubscriptionFactory.create_batch(2)
subscription_list = await SubscriptionFactory.list_subscriptions() # <== THIS FAILS
# The previous line runs under the hood: await subscriber.list_subscriptions(project=project)
sorted_subscription_list = sorted(subscription_list.subscriptions, key=attrgetter("name"))
for actual, expected in zip(sorted_subscription_list, subscriptions):
assert actual.name == expected.name async def test_list_topics(self, publisher):
topics = await TopicFactory.create_batch(2)
topic_list = await TopicFactory.list_topics() # <== THIS FAILS
# The previous line runs under the hood: await publisher.list_topics(project=project)
sorted_topic_list = sorted(topic_list.topics, key=attrgetter("name"))
for actual, expected in zip(sorted_topic_list, topics):
assert actual.name == expected.name I have the following Google dependencies installed:
My contract tests started to fail almost every time since August 2021. From time to time (they run once a day), they pass, but it's quite rare. Over the last month, they passed only once. |
I too am running into this issue, specifically with the Google Vision async client: https://github.com/googleapis/python-vision/blob/main/google/cloud/vision_v1/services/image_annotator/async_client.py#L42 Seems to happen when we attempt to use the same client to fire several concurrent requests. Appears intermittent and non-fatal because of the library's built in retry. |
I have same problem. I use google.auth library by cloud-logging, dialogflow, and others. |
I have the same problem! googleapis/python-pubsub#737 (comment) I think it's happens when you use a publisher and a subscriber in the same code. Also related : #253 |
I have the same problem in my pubsublite application |
any news about this? |
News? The same here. |
This is due to a race condition overwriting the token value after a refresh but before the headers are applied. |
This should be resolved in v2.17.2 |
Environment details
google-auth
version: 1.35.0google-cloud-bigtable
version: 1.7.0google-cloud-storage
version: 1.42.3google-cloud-pubsub
version: 2.8.0Error
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:
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.The text was updated successfully, but these errors were encountered: