-
Notifications
You must be signed in to change notification settings - Fork 675
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Azure WebApp Publish failed due to env not found error #1791
Comments
Virtual environments have hard coded paths to the base python path, which can cause problems if you try to reuse them across machines like you are doing here. I would recommend that you delete it and recreate it using PTVS. Since there's a requirements.txt at the root, PTVS will check the "install packages" in the new virtual env dialog by default. FYI SuppressWebSitesVirtualEnvError element is meant for the .pyproj file, not the web.config file. |
Also so you're aware, we're probably going to remove the virtualenv publishing functionality in the next version (with Visual Studio "15"). We'll recommend the process outlined at https://aka.ms/PythonOnAppService for getting started (and hopefully streamline it a bit by then, but even now we know customers are happier with that approach). |
Hi @zooba
Could you guide me the correct I uploaded my repository (PTVS created) as GitHub Public repo. Reproduce Steps
You can see my I successfully run it with |
I think you need to remove the rewrite rules from your web.config. Otherwise all your URLs are going to have a However, the error makes it look like the For the HTTP platform handler, do the second and subsequent requests also take 5-8 seconds? It wouldn't surprise me if there was a slow initial startup time but things are fine once the server is running. |
@zooba Thanks for supporting me. HTTP platform handlerI tested HTTP platform handler again and found that it requires initial warm up longer than I expected. I supposed the warm-up would be enough only at the first request but almost 10 times gives fast response. Transform logThere's no special message about transformation but let me attach the content.
FastCGI revisitedBy following your comment, I removed
I'd like to make run Flask with FastCGI as it has more integrated pipeline than self server. Could you test with my repository? or check my web.config again? Thanks |
There's nothing wrong with your web.config - it would seem that something strange is going on with the site itself. If it's easy for you to do, deleting and redeploying the whole thing may fix the issue, otherwise let's dig deeper. Can you check with the Kudu console that running There may be some other log files (in a |
Hi. @zooba I got a fresh news. please read. Test Steps
New approach 3.5.1 x64Just curious, I tested with The
Wow, now we can confidently say that the FastCgi module is invoked and the only problem is from my directory setup. The Detailed Error Information (htm file) is different also; the Approach 3.5.2 x64
|
Ah, excellent. I guess the IIS "could not be found" message actually means "it returned an error". In this case, it appears to be crashing. I'll see whether I can reproduce it. Until then, you may want to try correcting the WSGI_HANDLER variable in your web.config so that it can be found (I think it should be |
Hi @zooba However,
You can reproduce with my final repository that I tagged. Could it be marked as a bug? 🐛 |
Sure - feel free to file it over at https://github.com/Azure/azure-python-siteextensions |
VS 2017 no longer requires a virtual env. Python is installed via site extension. |
Symptom
I tried to publish Flask app to Azure WebApp, but failed due to the error message below. Sadly, default Azure Flask template also failed to publish.
Reproduce Steps
env
directory. Project hasPython27 (global default)
as environment.Python Environment
and clickAdd Existing Virtual Environment
.env
directory and it shows "We could not find a base interpreter at D:\Python27" error.Python Environment
and clickAdd/Remove Python Environments
, the dialog showsenv (unavailable)
in environment list.Questions
D:\Python27
in Step 6 and how can I fix it? I do not haveD:
drive and cannot find hard-coded line for that.<SuppressWebSitesVirtualEnvError>true</SuppressWebSitesVirtualEnvError>
in web.config? I cannot find any documentation and example.The text was updated successfully, but these errors were encountered: