Deploying Flask application on Google App Engine












0














This is my first web app I've ever developed, so even though I thoroughly searched everything I could for the Google App Engine, I'm afraid that my terminology and Google fu simply isn't good enough for what I need.
When I open up my terminal and type "python main.py", I can see that it works correctly on localhost.
Now I am trying to host this application on the Google App Engine. I have spent hours watching Youtube tutorials and following setup guides, trying to emulate their file structure and file contents. Whenever I deploy my app, I get the "500- Server Error: The server encountered an error and could not complete your request."



Here is my code: https://github.com/csherrod5/csherrod5.github.io
Here is an example of the types of guides I've been following: https://medium.freecodecamp.org/how-to-build-a-web-app-using-pythons-flask-and-google-app-engine-52b1bb82b221
I'm hoping someone is kind enough to help me diagnose my problem.
Thank you to everyone who stops by










share|improve this question






















  • App engine has good logging. If you go to the app engine console -> logging you should be able to see the stacktrace which will tell you why it's crashing.
    – Mark Meyer
    Nov 20 at 4:11










  • Pro-tip: change your secret keys immediately since it appears you uploaded them. In the future, I'd suggest keeping them in a configuration file that doesn't go up with your source control and gets loaded at runtime
    – TheIncorrigible1
    Nov 20 at 4:14










  • @TheIncorrigible1 thank you for the tip, I will take action accordingly.
    – Connor Sherrod
    Nov 20 at 5:50










  • @MarkMeyer Can you elaborate on this? I am on Google Cloud's Logging Page, I selected my project, but it just gives me an infinite loading circle
    – Connor Sherrod
    Nov 20 at 5:51










  • Update, all I see in my console logs are 4 logs that all look like this: link
    – Connor Sherrod
    Nov 20 at 5:59
















0














This is my first web app I've ever developed, so even though I thoroughly searched everything I could for the Google App Engine, I'm afraid that my terminology and Google fu simply isn't good enough for what I need.
When I open up my terminal and type "python main.py", I can see that it works correctly on localhost.
Now I am trying to host this application on the Google App Engine. I have spent hours watching Youtube tutorials and following setup guides, trying to emulate their file structure and file contents. Whenever I deploy my app, I get the "500- Server Error: The server encountered an error and could not complete your request."



Here is my code: https://github.com/csherrod5/csherrod5.github.io
Here is an example of the types of guides I've been following: https://medium.freecodecamp.org/how-to-build-a-web-app-using-pythons-flask-and-google-app-engine-52b1bb82b221
I'm hoping someone is kind enough to help me diagnose my problem.
Thank you to everyone who stops by










share|improve this question






















  • App engine has good logging. If you go to the app engine console -> logging you should be able to see the stacktrace which will tell you why it's crashing.
    – Mark Meyer
    Nov 20 at 4:11










  • Pro-tip: change your secret keys immediately since it appears you uploaded them. In the future, I'd suggest keeping them in a configuration file that doesn't go up with your source control and gets loaded at runtime
    – TheIncorrigible1
    Nov 20 at 4:14










  • @TheIncorrigible1 thank you for the tip, I will take action accordingly.
    – Connor Sherrod
    Nov 20 at 5:50










  • @MarkMeyer Can you elaborate on this? I am on Google Cloud's Logging Page, I selected my project, but it just gives me an infinite loading circle
    – Connor Sherrod
    Nov 20 at 5:51










  • Update, all I see in my console logs are 4 logs that all look like this: link
    – Connor Sherrod
    Nov 20 at 5:59














0












0








0







This is my first web app I've ever developed, so even though I thoroughly searched everything I could for the Google App Engine, I'm afraid that my terminology and Google fu simply isn't good enough for what I need.
When I open up my terminal and type "python main.py", I can see that it works correctly on localhost.
Now I am trying to host this application on the Google App Engine. I have spent hours watching Youtube tutorials and following setup guides, trying to emulate their file structure and file contents. Whenever I deploy my app, I get the "500- Server Error: The server encountered an error and could not complete your request."



Here is my code: https://github.com/csherrod5/csherrod5.github.io
Here is an example of the types of guides I've been following: https://medium.freecodecamp.org/how-to-build-a-web-app-using-pythons-flask-and-google-app-engine-52b1bb82b221
I'm hoping someone is kind enough to help me diagnose my problem.
Thank you to everyone who stops by










share|improve this question













This is my first web app I've ever developed, so even though I thoroughly searched everything I could for the Google App Engine, I'm afraid that my terminology and Google fu simply isn't good enough for what I need.
When I open up my terminal and type "python main.py", I can see that it works correctly on localhost.
Now I am trying to host this application on the Google App Engine. I have spent hours watching Youtube tutorials and following setup guides, trying to emulate their file structure and file contents. Whenever I deploy my app, I get the "500- Server Error: The server encountered an error and could not complete your request."



Here is my code: https://github.com/csherrod5/csherrod5.github.io
Here is an example of the types of guides I've been following: https://medium.freecodecamp.org/how-to-build-a-web-app-using-pythons-flask-and-google-app-engine-52b1bb82b221
I'm hoping someone is kind enough to help me diagnose my problem.
Thank you to everyone who stops by







python google-app-engine flask






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 20 at 4:08









Connor Sherrod

42




42












  • App engine has good logging. If you go to the app engine console -> logging you should be able to see the stacktrace which will tell you why it's crashing.
    – Mark Meyer
    Nov 20 at 4:11










  • Pro-tip: change your secret keys immediately since it appears you uploaded them. In the future, I'd suggest keeping them in a configuration file that doesn't go up with your source control and gets loaded at runtime
    – TheIncorrigible1
    Nov 20 at 4:14










  • @TheIncorrigible1 thank you for the tip, I will take action accordingly.
    – Connor Sherrod
    Nov 20 at 5:50










  • @MarkMeyer Can you elaborate on this? I am on Google Cloud's Logging Page, I selected my project, but it just gives me an infinite loading circle
    – Connor Sherrod
    Nov 20 at 5:51










  • Update, all I see in my console logs are 4 logs that all look like this: link
    – Connor Sherrod
    Nov 20 at 5:59


















  • App engine has good logging. If you go to the app engine console -> logging you should be able to see the stacktrace which will tell you why it's crashing.
    – Mark Meyer
    Nov 20 at 4:11










  • Pro-tip: change your secret keys immediately since it appears you uploaded them. In the future, I'd suggest keeping them in a configuration file that doesn't go up with your source control and gets loaded at runtime
    – TheIncorrigible1
    Nov 20 at 4:14










  • @TheIncorrigible1 thank you for the tip, I will take action accordingly.
    – Connor Sherrod
    Nov 20 at 5:50










  • @MarkMeyer Can you elaborate on this? I am on Google Cloud's Logging Page, I selected my project, but it just gives me an infinite loading circle
    – Connor Sherrod
    Nov 20 at 5:51










  • Update, all I see in my console logs are 4 logs that all look like this: link
    – Connor Sherrod
    Nov 20 at 5:59
















App engine has good logging. If you go to the app engine console -> logging you should be able to see the stacktrace which will tell you why it's crashing.
– Mark Meyer
Nov 20 at 4:11




App engine has good logging. If you go to the app engine console -> logging you should be able to see the stacktrace which will tell you why it's crashing.
– Mark Meyer
Nov 20 at 4:11












Pro-tip: change your secret keys immediately since it appears you uploaded them. In the future, I'd suggest keeping them in a configuration file that doesn't go up with your source control and gets loaded at runtime
– TheIncorrigible1
Nov 20 at 4:14




Pro-tip: change your secret keys immediately since it appears you uploaded them. In the future, I'd suggest keeping them in a configuration file that doesn't go up with your source control and gets loaded at runtime
– TheIncorrigible1
Nov 20 at 4:14












@TheIncorrigible1 thank you for the tip, I will take action accordingly.
– Connor Sherrod
Nov 20 at 5:50




@TheIncorrigible1 thank you for the tip, I will take action accordingly.
– Connor Sherrod
Nov 20 at 5:50












@MarkMeyer Can you elaborate on this? I am on Google Cloud's Logging Page, I selected my project, but it just gives me an infinite loading circle
– Connor Sherrod
Nov 20 at 5:51




@MarkMeyer Can you elaborate on this? I am on Google Cloud's Logging Page, I selected my project, but it just gives me an infinite loading circle
– Connor Sherrod
Nov 20 at 5:51












Update, all I see in my console logs are 4 logs that all look like this: link
– Connor Sherrod
Nov 20 at 5:59




Update, all I see in my console logs are 4 logs that all look like this: link
– Connor Sherrod
Nov 20 at 5:59












1 Answer
1






active

oldest

votes


















0














There's no lib folder in your application directory, so App Engine won't have any of the third party libraries you're trying to import.



You've correctly added the appengine_config.py file needed to vendorise third-party libraries, but you need to add the libraries you want to use to a 'lib' folder in your application directory.



Some of the libraries you want to use are built into the runtime, you just have to add them to your app.yaml to use them.






share|improve this answer





















    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53386082%2fdeploying-flask-application-on-google-app-engine%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    There's no lib folder in your application directory, so App Engine won't have any of the third party libraries you're trying to import.



    You've correctly added the appengine_config.py file needed to vendorise third-party libraries, but you need to add the libraries you want to use to a 'lib' folder in your application directory.



    Some of the libraries you want to use are built into the runtime, you just have to add them to your app.yaml to use them.






    share|improve this answer


























      0














      There's no lib folder in your application directory, so App Engine won't have any of the third party libraries you're trying to import.



      You've correctly added the appengine_config.py file needed to vendorise third-party libraries, but you need to add the libraries you want to use to a 'lib' folder in your application directory.



      Some of the libraries you want to use are built into the runtime, you just have to add them to your app.yaml to use them.






      share|improve this answer
























        0












        0








        0






        There's no lib folder in your application directory, so App Engine won't have any of the third party libraries you're trying to import.



        You've correctly added the appengine_config.py file needed to vendorise third-party libraries, but you need to add the libraries you want to use to a 'lib' folder in your application directory.



        Some of the libraries you want to use are built into the runtime, you just have to add them to your app.yaml to use them.






        share|improve this answer












        There's no lib folder in your application directory, so App Engine won't have any of the third party libraries you're trying to import.



        You've correctly added the appengine_config.py file needed to vendorise third-party libraries, but you need to add the libraries you want to use to a 'lib' folder in your application directory.



        Some of the libraries you want to use are built into the runtime, you just have to add them to your app.yaml to use them.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 20 at 16:57









        Christopher P

        55815




        55815






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53386082%2fdeploying-flask-application-on-google-app-engine%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            "Incorrect syntax near the keyword 'ON'. (on update cascade, on delete cascade,)

            Alcedinidae

            RAC Tourist Trophy