Error occurred:
Traceback (most recent call last):
File "c:\python36-32\lib\site-packages\wfastcgi.py", line 851, in main
response.send(FCGI_STDOUT, part)
File "c:\python36-32\lib\site-packages\wfastcgi.py", line 756, in send
return send_response(self.stream, self.record.req_id, resp_type, content, streaming)
File "c:\python36-32\lib\site-packages\wfastcgi.py", line 370, in send_response
raise TypeError("content must be encoded before sending: %r" % content)
TypeError: content must be encoded before sending: 'a'I've tried python 3.4 / 3.5 / 3.6 and 3.7 but all with the same result. Going back to 2.7 is not what I want, due to end-of-life of python 2.7 and my site is coded in Python 3.
I've installed the source-code version of web2py and the user-registration in the standard welcome application is working fine. So the patform seems to work.
It's something between web2py and wfastcgi, but I've no clue what is causing this error and how to solve it.
Any help would be fantastic. routers = dict(BASE=dict(path_prefix = "XXX"))
<add name="Python_via_FastCGI" path="handler.web2py" verb="*" modules="FastCgiModule" scriptProcessor="<path 2 python installation>\python.exe|<path to web2py install>\site-packages\wfastcgi.py" resourceType="Unspecified" requireAccess="Script" />
https://www.youtube.com/watch?v=_4to_44DcJU time : 46:15
Run from web2py base folder :
For 2.7 :
from gluon.main import save_password; save_password(raw_input('admin password: '),443)
For 3.x
from gluon.main import save_password; save_password(input('admin password: '),443)
<?xml version="1.0" encoding="UTF-8"?>
<!-- app configuration for web2py on IIS -->
<configuration>
<appSettings>
<add key="WSGI_HANDLER" value="gluon.main.wsgibase" />
<add key="WSGI_RESTART_FILE_REGEX" value=".*((routes\.py)|(\.config))$" />
</appSettings>
<system.webServer>
<rewrite>
<rules>
<clear />
<rule name="static" enabled="true" stopProcessing="true">
<match url="^(\w+)/static(?:/_[\d]+\.[\d]+\.[\d]+)?/(.*)$" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
<action type="Rewrite" url="applications/{R:1}/static/{R:2}" logRewrittenUrl="false" />
</rule>
<rule name="web2py_app" enabled="true" stopProcessing="true">
<match url="(.*)" ignoreCase="false" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
<action type="Rewrite" url="handler.web2py/{R:1}" appendQueryString="true" />
</rule>
</rules>
<outboundRules>
<rule name="static_version_cache_control" preCondition="static_version">
<match serverVariable="RESPONSE_Cache-Control" pattern=".*" />
<action type="Rewrite" value="max-age=315360000" />
<conditions>
</conditions>
</rule>
<rule name="static_version_Expires" preCondition="static_version">
<match serverVariable="RESPONSE_Expires" pattern=".*" />
<action type="Rewrite" value="Thu, 31 Dec 2037 23:59:59 GMT" />
</rule>
<preConditions>
<preCondition name="static_version">
<add input="{REQUEST_URI}" pattern="(\w+)/static(?:/_[\d]+\.[\d]+\.[\d]+)?/(.*)$" />
</preCondition>
</preConditions>
</outboundRules>
</rewrite>
</system.webServer>
</configuration>