C:\Users\Jobin>cd c:\web2py
c:\web2py>c:\python27\python.exe web2py.py
Traceback (most recent call last):
File "web2py.py", line 8, in <module>
from multiprocessing import freeze_support
File "c:\python27\lib\multiprocessing\__init__.py", line 83, in <module>
import _multiprocessing
ImportError: DLL load failed: %1 is not a valid Win32 application.
c:\web2py>
On Monday, March 30, 2020 at 12:03:40 PM UTC+5:30, Jobin Antony wrote:
>
> c:\web2py>c:\python27\python.exe web2py.exe
> File "web2py.exe", line 1
> SyntaxError: Non-ASCII character '\x90' in file web2py.exe on line 1, but
> no encoding declared; see http://www.python.org/peps/pep-0263.html for
> details
>
> c:\web2py>
>
> On Thursday, March 26, 2020 at 10:18:51 AM UTC+5:30, Dave S wrote:
>>
>>
>>
>> On Saturday, March 21, 2020 at 1:59:59 PM UTC-7, Andrea Fae' wrote:
>>>
>>> I have a windows 10 PC.
>>> I installed c:\python27 and c:\python3 and they are working. I can
>>> choose.
>>>
>>> But if I try to start web2py it happens this error:
>>>
>>> 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
>>>
>>>
>> Make sure you have separate directories for running under python 2.7 and
>> python 3.x.
>> Files get compiled, and the .pyc is not portable between the two versions.
>>
>> /dps
>>
>>
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/web2py/82952742-b479-48f9-b8a0-83a85a3e5590%40googlegroups.com.