You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What version of gRPC and what language are you using?
grpcio 1.62.1
grpcio-tools 1.62.1
What operating system (Linux, Windows,...) and version?
ubuntu 22
What runtime / compiler are you using (e.g. python version or version of gcc)
Python 3.10.12
What did you do?
I set the options for my insecure channel like this:
service_config_json = json.dumps(
{
"methodConfig": [
{
# To apply retry to all methods, put [{}] in the "name" field
"name": [
{"service": "helloworld.Greeter", "method": "SayHello"}
],
"retryPolicy": {
"maxAttempts": 5,
"initialBackoff": "0.01s",
"maxBackoff": "0.06s",
"backoffMultiplier": 1.5,
"retryableStatusCodes": ["UNAVAILABLE"],
},
}
]
}
)
I see the error:
INVALID_ARGUMENT: errors validating service config: [field:methodConfig[0].retryPolicy.initialBackoff error:Not a duration (not a number of seconds); field:methodConfig[0].retryPolicy.maxBackoff error:Not a duration (not a number of seconds)]
I tried several values for initialBackoff and only integer values run without error. This contradicts this provided example:
We can't actually reproduce on our end -- non-integers work just fine with this example. In fact, by copy-pasting your json above, it still works. I'm wondering if you have a weird character accidentally added. For example, if a zero-width space ends up in your duration string somehow, this is the error you will see. Please take another look and see if there are weird characters hanging around.
What version of gRPC and what language are you using?
grpcio 1.62.1
grpcio-tools 1.62.1
What operating system (Linux, Windows,...) and version?
ubuntu 22
What runtime / compiler are you using (e.g. python version or version of gcc)
Python 3.10.12
What did you do?
I set the options for my insecure channel like this:
I see the error:
I tried several values for initialBackoff and only integer values run without error. This contradicts this provided example:
https://github.com/grpc/grpc/blob/master/examples/python/retry/retry_client.py
The text was updated successfully, but these errors were encountered: