none
[Python][Web Apps] Python\Flask App doesnt work when deployed from github RRS feed

All replies

  • According your Github repository, it's an entire VS solution directory, not the root directory of your python application.

    Usually, when we leverage git or github to deploy the applications to Azure Web Apps, we will store the all contents in root directory into the repository. And Azure will determine that your application uses Python if both of these conditions are true:

    •  requirements.txt file in the root folder
    • any .py file in the root folder OR a runtime.txt that specifies python

    You can refer to https://azure.microsoft.com/en-us/documentation/articles/web-sites-python-configure/#git-publishing for more details.

    Meanwhile, you can define the configuration in app settings of your Azure Web Apps: DEPLOYMENT_SOURCE to the path of app's root directory in your repository, like "AccountingWebApp" here in your issue. 

     
    Thursday, March 17, 2016 2:42 AM
    Moderator
  • Thanks, I'll check it out, but that how Visual Studio created it, not me. It works just fine for ASP.NET app that way... I thought Visual Studio is smart enough to do that... I'll try your solution and get back to you, thanks!

    The data above this text is pseudorandom, brace yourselves.

    Thursday, March 17, 2016 7:12 AM
  • Using custom deployment setting for DEPLOYMENT_SOURCE custom value is 'https://github.com/4c74356b41/pyflare/tree/master/AccountingWebApp'. Handling Basic Web Site deployment. Error: The given path's format is not supported.

    how do I format it?

    btw, on my app settings it says python = off, is that how its supposed to be?
    funny enough the website works... (not deployed from git yet).


    The data above this text is pseudorandom, brace yourselves.




    Thursday, March 17, 2016 7:27 AM
  • Not the path related to your github URL, to relative path in repository directory.

    You can try to directly set to "AccountingWebApp" in your scenario.

    Sorry for forgetting edit the format in my answer, which remained the link format and mislead you. 


    Thursday, March 17, 2016 7:38 AM
    Moderator
  • Bear with me please, I'm updating the setting now, well yes, it did deploy now, but the website returns 500 now ;)))

    The data above this text is pseudorandom, brace yourselves.


    Thursday, March 17, 2016 7:44 AM
  • It seems that it missed the passwords.py file in your repository, do you complete the application with password.py file after you finished deploying to Azure?
    Thursday, March 17, 2016 7:57 AM
    Moderator
  • its should work without passwords.py, it won't connect to redis, but that doesn't really matter. the file is still there. in the same folder where it was

    The data above this text is pseudorandom, brace yourselves.


    Thursday, March 17, 2016 8:21 AM
  • I pull your repository to local, open your solution with VS 2015, but failed to run directly without this file.
    Thursday, March 17, 2016 8:24 AM
    Moderator
  • well, the file is still in the folder, so it should work, right? in the same place it was before I switched to git


    The data above this text is pseudorandom, brace yourselves.



    Thursday, March 17, 2016 8:26 AM
  • Any other ideas, Gary? Anyone? Please.

    The data above this text is pseudorandom, brace yourselves.

    Friday, March 18, 2016 7:05 AM
  • Hi,

    I am trying to involve someone familiar with this topic to further look at this issue. There might be some time delay. Appreciate your patience.

    Friday, March 18, 2016 7:10 AM
    Moderator
  • Okay, delay is okay. I'm fine with that. Nothing critical, just don't abandon me please ;)

    The data above this text is pseudorandom, brace yourselves.

    Friday, March 18, 2016 7:28 AM
  • So I'll just paste my findings from another thread.

    "I've tried creating Flask app in Azure. It deploys and work.
    After that I create the same app in Visual Studio (well, I guess they are the same, as they look the same when created). Upload that Visual studio project to GitHub, deployed to WebApp. Errors out - 500.
    I guess something is broken guys. Well at least I can't figure out for 2 days already how to do that stuff properly. And you know, I'm pretty bad at doing things, but not that bad."


    The data above this text is pseudorandom, brace yourselves.

    Monday, March 21, 2016 8:05 AM
  • Hi,

    Since the issue  is a bit hard to reproduce on our side, could you please share the web app's info with us via leveraging the approach that pointed out at https://github.com/projectkudu/kudu/wiki/Reporting-your-site-name-without-posting-it-publicly? The basic idea is - if you prefer not to share the info publicly on the forum (which we fully understand), there is an alternate way that will allow us to know your site name without revealing it to others, even if you cannot create a site, you can find the info sharing approach at the bottom of https://github.com/projectkudu/kudu/wiki/Reporting-your-site-name-without-posting-it-publicly. Should you have any further concern, please feel free to let us know. Looking forward to having your feedback.

    Regards,

    Will


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, March 21, 2016 9:23 AM
    Moderator
  • nah, its fine. http://flaskot4.azurewebsites.net/

    The data above this text is pseudorandom, brace yourselves.

    Monday, March 21, 2016 3:02 PM
  • Any news, folks? Thanks!

    The data above this text is pseudorandom, brace yourselves.

    Tuesday, March 22, 2016 7:06 PM
  • hi sir,

    Thanks for your patience. I have reported this issue and we will get back to you later as soon as we can. Appreciate your understanding.

    Regards,
    Will 

    Wednesday, March 23, 2016 2:17 AM
  • Thanks!

    The data above this text is pseudorandom, brace yourselves.

    Wednesday, March 23, 2016 6:58 AM
  • Hi,

    As Gary Liu has suggested earlier,

    you should have web.config and all the required files at wwwroot folder

    Below url is where your app should start

    https://github.com/4c74356b41/pyflare/tree/master/AccountingWebApp

    - try making a git deployment from within solution and see if it works. 

    https://azure.microsoft.com/en-us/documentation/articles/web-sites-publish-source-control/ 

    I dont have python turned on but it's still working ?

    - You are using virutal environment(env folder in your app which has python.exe in scripts folder)

    Let us know if you need more help


    Monday, March 28, 2016 7:17 PM
  • Yeah, sorry, forgot about this thread. Just like I said, it has not much to do with this particular App. All you have to do to reproduce this error is create flask\bootstrap app in visual studio and deploy it to azure through GitHub\local git repo and webapp will stop working.

    And yes, I've tried doing what you said to no avail.


    The data above this text is pseudorandom, brace yourselves.


    Tuesday, April 5, 2016 3:48 PM