I have a windows 10 PC.
I installed c:\python27 and c:\python3 and they are working. I can choose.
c:\Python3>python.exe c:\web2py\web2py.py
Traceback (most recent call last):
File "c:\web2py\web2py.py", line 21, in <module>
import gluon.widget
File "c:\web2py\gluon\__init__.py", line 37, in <module>
from .globals import current
File "c:\web2py\gluon\globals.py", line 24, in <module>
from gluon.serializers import json, custom_json
File "c:\web2py\gluon\serializers.py", line 10, in <module>
from gluon.languages import lazyT
File "c:\web2py\gluon\languages.py", line 19, in <module>
from cgi import escape
ImportError: cannot import name 'escape' from 'cgi' (c:\Python3\lib\cgi.py)
I found that changing "from cgi import escape" to "from html import escape" it start but I don't knoy why.
Nevertheless If I try to start an app built from Python27 I have this error:
<type 'exceptions.RuntimeError'> Failure to connect, tried 5 times: Traceback (most recent call last): File "C:\web2py\gluon\packages\dal\pydal\base.py", line 454, in __init__ self._adapter = adapter(**kwargs) File "C:\web2py\gluon\packages\dal\pydal\adapters\__init__.py", line 40, in __call__ obj = super(AdapterMeta, cls).__call__(*args, **kwargs) File "C:\web2py\gluon\packages\dal\pydal\adapters\base.py", line 368, in __init__ super(SQLAdapter, self).__init__(*args, **kwargs) File "C:\web2py\gluon\packages\dal\pydal\adapters\base.py", line 52, in __init__ self.reconnect() File "C:\web2py\gluon\packages\dal\pydal\connection.py", line 172, in reconnect self.connection = self.connector() File "C:\web2py\gluon\packages\dal\pydal\adapters\mysql.py", line 52, in connector return self.driver.connect(**self.driver_args) File "C:\web2py\gluon\contrib\pymysql\__init__.py", line 90, in Connect return Connection(*args, **kwargs) File "C:\web2py\gluon\contrib\pymysql\connections.py", line 688, in __init__ self.connect() File "C:\web2py\gluon\contrib\pymysql\connections.py", line 905, in connect self._get_server_information() File "C:\web2py\gluon\contrib\pymysql\connections.py", line 1231, in _get_server_information self.server_charset = charset_by_id(lang).name File "C:\web2py\gluon\contrib\pymysql\charset.py", line 38, in by_id return self._by_id[id] KeyError: 255
If I start the same app with web2py on python 2.7 changing back to "from cgi import escape" and it's working.
Maybe this is a problem regarding foreign-keys, I had one time in the past but.... really... I don't remember how to fix.
Thank you