Closed leo-padron closed 2 years ago
This is not parsing the command correctly.
I think you need to write "create-push"
instead of create-push
for this to work properly.
Part of docs: https://github.com/GoogleCloudPlatform/functions-framework-python#quickstart-pubsub-emulator
@anguillanneuf, can you triage this issue since you added these docs?
@leo-padron I wasn't able to reproduce the error you are seeing.
This is what I get:
tianzi 14:32 snippets % python subscriber.py tz-playground-bigdata create-push one yiyi http://localhost:8080 (main)
Push subscription created: name: "projects/tz-playground-bigdata/subscriptions/yiyi"
topic: "projects/tz-playground-bigdata/topics/one"
push_config {
push_endpoint: "http://localhost:8080"
}
ack_deadline_seconds: 10
message_retention_duration {
seconds: 604800
}
.
Endpoint for subscription is: http://localhost:8080
I suspect $TOPIC_ID and $PUSH_SUBSCRIPTION_ID aren't populated in your case. Could you check? Thanks for your patience.
I have a question for the paragraph of using PubSub Emulator
Above the example function, def hello(event, context):
, there is no decorator like @functions_framework.cloud_event
.
@leo-padron Is this the reason for your error ?
There is no decorator for event
, just cloud_event
- which is preferred.
I'm going to close this as both Tianzi and myself couldn't repro the issue and I believe there's just a user-error typo.
I'm following the instructions exactly as described in Functions Framework for Python -Quickstart: Pub/Sub emulator
But I run these steps:
I get this error: