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
{{ message }}
Repository navigation
subscriber.py receive requires an args.timeout but it is missing from positional or optional arguments #2633
I was following the directions here [1] to receive from a subscription I created in the emulator and it fails saying it has no args.timeout. I see no way to provide this or any code that would parse this even if provided.
@phx-srankin Thanks for noticing this! We recently updated all the subscriber samples in GitHub. Adding this line receive_parser.add_argument("--timeout", default=None, type=float) beneath the code here will help. I will work on an update.
Activity
gguuss commentedon Dec 18, 2019
Reassigning to Alex who may have more information about what's going on with PubSub.
busunkim96 commentedon Dec 18, 2019
It looks like Alex is OOO right now. @anguillanneuf could you take a look?
anguillanneuf commentedon Dec 18, 2019
@phx-srankin Thanks for noticing this! We recently updated all the subscriber samples in GitHub. Adding this line
receive_parser.add_argument("--timeout", default=None, type=float)beneath the code here will help. I will work on an update.python-docs-samples/pubsub/cloud-client/subscriber.py
Lines 483 to 486 in 9582dbc
Something else that you might notice when running this code (but won't affect receiving messages) is
AttributeError: 'NoneType' object has no attribute 'received_messages'. It has been fixed via this PR but the update will only show up in the next release of the library. Friendly ping to @pradn and @plamut to cut the next release asap.Thanks for your patience!
pradn commentedon Dec 18, 2019
Thanks @phx-srankin for a good bug report. And, thanks @anguillanneuf for taking a look at this.
We'll be cutting the next release the week of Jan 20 b/c time-off / holidays.