Closed andresgalarza-astro closed 4 years ago
Same issue here
Is the issue that we need to rename the function after the new token? So we have to manually rename the function in main.py as the new token?
AttributeError: module 'main' has no attribute 'ingestflights
One solution is to add the --entry-point flag with ingest_flights as value to the deploy_cf.sh and specify .
gcloud functions deploy $URL --entry-point ingest_flights --runtime python37 --trigger-http --timeout 480s
Thanks, can you submit a pull request with the change?
On Mon, Oct 5, 2020, 1:24 AM kja notifications@github.com wrote:
One solution is to add the --entry-point flag to the deploy_cf.sh. gcloud functions deploy $URL --entry-point ingest_flight --runtime python37 --trigger-http --timeout 480s
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/GoogleCloudPlatform/data-science-on-gcp/issues/89#issuecomment-703482180, or unsubscribe https://github.com/notifications/unsubscribe-auth/AANJPZZ34LB5A3PP6KSOSL3SJF7DXANCNFSM4MVV7FVA .
Hello there! I'm currently following this tutorial and when I ran ./deploy_cf.sh after setting the token and modifying it on main.py I got the following error
ingest_flights_vNdUIIMPCAy5v8715MV361o4TTdDBssZ Allow unauthenticated invocations of new function [ingest_flights_vNdUIIMPCAy5v8715MV361o4TTdDBssZ]? (y/N)? y Deploying function (may take a while - up to 2 minutes)...failed. ERROR: (gcloud.functions.deploy) OperationError: code=3, message=Function failed on loading user code. Error message: File main.py is expected to contain a functi on named ingest_flights_vNdUIIMPCAy5v8715MV361o4TTdDBssZ