Hi,

I'm facing a strange error on Windows - I hope you can help me ;-)

With python 2.7.16 64 bit, I can build one-folder binaries for the web2py 
framework but when I run it I get the error:

Traceback (most recent call last):
  File "web2py.py", line 21, in <module>
  File "C:\Users\nico\Desktop\web2py_win\web2py\gluon\widget.py", line 23, 
in <module>
    from gluon import main, newcron
  File "C:\Users\nico\Desktop\web2py_win\web2py\gluon\main.py", line 114, in 
<module>
    from gluon import rocket
  File "C:\Users\nico\Desktop\web2py_win\web2py\gluon\rocket.py", line 26, 
in <module>
    IS_JYTHON = platform.system() == 'Java'  # Handle special cases for 
Jython
  File "platform.py", line 1265, in system
  File "platform.py", line 1161, in uname
  File "platform.py", line 637, in win32_ver
  File "platform.py", line 593, in _get_real_winver
  File "site-packages\PyInstaller\loader\pyiboot01_bootstrap.py", line 174, 
in __init__
__main__.PyInstallerImportError: Failed to load dynlib/dll 
'C:\\Users\\nico\\Desktop\\WEB2PY~1\\web2py\\version'. Most probably this 
dynlib/dll was not found when the application was frozen.
[3776] Failed to execute script web2py




Hence, it seems that the error comes from the official python module 
platform.py that cannot find the Windows's version.dll file. This DLL is 
obviously present on C:\windows\system32 (Win 10 64 bit) and I cannot embed 
it in the binary.

Note that I have no problem with PY3, and the error disappears if I copy 
the DLL in the binary dir. 

Also, a simple test with:

import platform
IS_JYTHON = platform.system() == 'Java'  
if IS_JYTHON == True:
    print('IS_JYTHON is True')
elif IS_JYTHON == False:
    print('IS_JYTHON is False')
else:
    print('IS_JYTHON is Unknown')


compiles and runs without any problem. As a workaround, I have forced '
IS_JYTHON = False' on rocket.py in order to skip the error but it's not so 
elegant.


What's wrong and what can I do?


Thank you,
Nico





-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/pyinstaller.
For more options, visit https://groups.google.com/d/optout.

Reply via email to