profile
viewpoint

Ask questionsAn unknown FastCGI error occurred: Django + Python 3.5

When attempting to use Python 3.5 with my Django App, I get a 500 error with the message, "An unknown FastCGI error occurred". I have no problems with Python 3.4 -- works like a charm. Here is my web.config:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<appSettings>
	<!--<add key="WSGI_ALT_VIRTUALENV_HANDLER" value="django.core.wsgi.get_wsgi_application()" />-->
	<!--<add key="WSGI_ALT_VIRTUALENV_ACTIVATE_THIS" value="c:\users\aarsan\projects\condofront\env\Scripts\python.exe" />-->
	<add key="WSGI_HANDLER" value="django.core.wsgi.get_wsgi_application()" />
	<add key="PYTHONPATH" value="c:\users\aarsan\projects\condofront" />
	<add key="DJANGO_SETTINGS_MODULE" value="condofront.settings_dev" />
	<!--<add key="WSGI_LOG" value="c:\LogFiles\wfastcgi.log"/>-->
</appSettings>
<system.webServer>
	<handlers>
		<add name="PythonHandler" 
			path="handler.fcgi" 
			verb="*"
			modules="FastCgiModule" 
			scriptProcessor="c:\users\aarsan\appdata\local\programs\python\python35\python.exe|c:\users\aarsan\appdata\local\programs\python\python35\lib\site-packages\wfastcgi.py" 
			resourceType="Unspecified" 
			requireAccess="Script" />
	</handlers>
	<rewrite>
		<rules>
			<rule name="Static Files" stopProcessing="true">
				<conditions>
					<add input="true" pattern="false" />
				</conditions>
			</rule>
			<rule name="Configure Python" stopProcessing="true">
				<match url="(.*)" ignoreCase="false" />
				<conditions>
					<add input="{REQUEST_URI}" pattern="^/static/.*" ignoreCase="true" negate="true" />
				</conditions>
				<action type="Rewrite" url="handler.fcgi/{R:1}" appendQueryString="true" />
			</rule>
		</rules>
	</rewrite>
</system.webServer>

</configuration>

microsoft/PTVS

Answer questions 20iahazban

it saved my life too, ty

useful!
source:https://uonfu.com/
Github User Rank List