Problem:-
I am trying to create a small test backend using flask to save some location related fields and deployed it in GCP APP ENGINE (standard) and do some basic post and get. The get calls seem to be working but when i post it throws an 500 error .
What i have tried:-
When i try to post it by running python3 main.py in google console the response is a sign in page from google but when i enter the credentials doesnt go to the next screen.
App worked fine in my local machine and is working in AWS EC2.Have to use gcloud due to organisation requirement.
I followed the tutorial provided with google app engine for python application.
Here is the code:-
https://github.com/karan1414/sfab-test
I changed the app.py to main.py while i deployed it on GCP.
P.S : I just want some guidance on the right way to deploy a flask app on gcp. Pardon my commenting and code i am just a beginner looking to learn and improve. And this is my first question on stack overflow so do let me know if i have made some mistake while posting the question tried my best to adhere to the rules. Thank you !
Hello Karan,
This 500 error you are receiving could be due to missing libraries (flask) since I do not see a requirements.txt on your github. Please follow our quickstart on how to get started with Python 3.7 which covers how to install libraries using a requirements.txt.
Hello Karan,
This 500 error you are receiving could be due to missing libraries (flask) since I do not see a requirements.txt on your github. Please follow our quickstart on how to get started with Python 3.7 which covers how to install libraries using a requirements.txt.
--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengine+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/98e08141-3566-42d1-a7b5-041f11922228%40googlegroups.com.
The 500 error you are receiving may be due to an issue with what happens in your post, specifically when you try to write to your database. You can try catching any errors in that method or you could also check more details about the error by using the Stackdriver Logging. You can easily access your application's logs by going to the Cloud Console and clicking on the hamburger left top corner -> App Engine -> Services -> select the proper service then click on versions -> select the proper version and below diagnose, right click -> Logs. You can also access these logs from the Stackdriver Logging menu by using the filtering option.
I have removed your projectID from the post as this is personal information that should not be shared with the public.