subscriber.py receive requires an args.timeout but it is missing from positional or optional arguments #2633
Labels
api: pubsub
Issues related to the Pub/Sub API.
triage me
I really want to be triaged.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
In which file did you encounter the issue?
subscriber.py
GoogleCloudPlatform/python-docs-samples/pubsub/cloud-client
Did you change the file? If so, how?
No
Describe the issue
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.
[1] https://cloud.google.com/pubsub/docs/emulator
python subscriber.py my-project-id receive my-sub
Traceback (most recent call last):
File "subscriber.py", line 541, in
receive_messages(args.project_id, args.subscription_name, args.timeout)
AttributeError: 'Namespace' object has no attribute 'timeout'
python subscriber.py my-project-id receive my-sub timeout=5
usage: subscriber.py [-h]
project_id
{list_in_topic,list_in_project,create,create-push,delete,update,receive,receive-custom-attributes,receive-flow-control,receive-synchronously,receive-synchronously-with-lease,listen_for_errors}
...
subscriber.py: error: unrecognized arguments: timeout=5
The text was updated successfully, but these errors were encountered: