Issue315

Title Cant execute resulting build from windows command prompt
Priority bug Status resolved
Superseder Nosy List djastro
Assigned To Keywords standalone, windows

Created on 2016-07-27.15:46:11 by djastro, last changed by kayhayen.

Messages
msg2502 (view) Author: kayhayen Date: 2018-08-23.23:22:41
Standalone mode has improved a lot since this, I am assuming it works.
msg1966 (view) Author: djastro Date: 2016-09-11.09:43:34
hi, sorry dindn't see your answer.

ok, first, here is the output when (with nuitka 0.5.19) i dont copy the ctype module:

# installing zipimport hook
import zipimport # builtin
# installed zipimport hook
setup nuitka compiled module/shlib importer
import os # considering responsibility
import os # claimed responsibility (frozen)
Loading os
import os # frozen
import errno # considering responsibility
import errno # denied responsibility
import errno # builtin
import nt # considering responsibility
import nt # denied responsibility
import nt # builtin
import ntpath # considering responsibility
import ntpath # claimed responsibility (frozen)
Loading ntpath
import ntpath # frozen
import stat # considering responsibility
import stat # claimed responsibility (frozen)
Loading stat
import stat # frozen
import genericpath # considering responsibility
import genericpath # claimed responsibility (frozen)
Loading genericpath
import genericpath # frozen
import warnings # considering responsibility
import warnings # claimed responsibility (frozen)
Loading warnings
import warnings # frozen
import linecache # considering responsibility
import linecache # claimed responsibility (frozen)
Loading linecache
import linecache # frozen
import types # considering responsibility
import types # claimed responsibility (frozen)
Loading types
import types # frozen
import UserDict # considering responsibility
import UserDict # claimed responsibility (frozen)
Loading UserDict
import UserDict # frozen
import _abcoll # considering responsibility
import _abcoll # claimed responsibility (frozen)
Loading _abcoll
import _abcoll # frozen
import abc # considering responsibility
import abc # claimed responsibility (frozen)
Loading abc
import abc # frozen
import _weakrefset # considering responsibility
import _weakrefset # claimed responsibility (frozen)
Loading _weakrefset
import _weakrefset # frozen
import _weakref # considering responsibility
import _weakref # denied responsibility
import _weakref # builtin
import copy_reg # considering responsibility
import copy_reg # claimed responsibility (frozen)
Loading copy_reg
import copy_reg # frozen
import site # considering responsibility
import site # claimed responsibility (frozen)
Loading site
import site # frozen
import traceback # considering responsibility
import traceback # claimed responsibility (frozen)
Loading traceback
import traceback # frozen
import sysconfig # considering responsibility
import sysconfig # claimed responsibility (frozen)
Loading sysconfig
import sysconfig # frozen
import re # considering responsibility
import re # claimed responsibility (frozen)
Loading re
import re # frozen
import sre_compile # considering responsibility
import sre_compile # claimed responsibility (frozen)
Loading sre_compile
import sre_compile # frozen
import _sre # considering responsibility
import _sre # denied responsibility
import _sre # builtin
import sre_parse # considering responsibility
import sre_parse # claimed responsibility (frozen)
Loading sre_parse
import sre_parse # frozen
import sre_constants # considering responsibility
import sre_constants # claimed responsibility (frozen)
Loading sre_constants
import sre_constants # frozen
import _locale # considering responsibility
import _locale # denied responsibility
import _locale # builtin
import locale # considering responsibility
import locale # claimed responsibility (frozen)
Loading locale
import locale # frozen
import encodings # considering responsibility
import encodings # claimed responsibility (frozen)
Loading encodings
import encodings # frozen package
import encodings.codecs # considering responsibility
import encodings.codecs # denied responsibility
import codecs # considering responsibility
import codecs # claimed responsibility (frozen)
Loading codecs
import codecs # frozen
import _codecs # considering responsibility
import _codecs # denied responsibility
import _codecs # builtin
import encodings.encodings # considering responsibility
import encodings.encodings # denied responsibility
import encodings.aliases # considering responsibility
import encodings.aliases # claimed responsibility (frozen)
Loading encodings.aliases
import encodings.aliases # frozen
import encodings.__builtin__ # considering responsibility
import encodings.__builtin__ # denied responsibility
import operator # considering responsibility
import operator # denied responsibility
import operator # builtin
import functools # considering responsibility
import functools # claimed responsibility (frozen)
Loading functools
import functools # frozen
import _functools # considering responsibility
import _functools # denied responsibility
import _functools # builtin
import encodings.cp1252 # considering responsibility
import encodings.cp1252 # claimed responsibility (frozen)
Loading encodings.cp1252
import encodings.cp1252 # frozen
import sitecustomize # considering responsibility
import sitecustomize # denied responsibility
import usercustomize # considering responsibility
import usercustomize # denied responsibility
import PyQt4 # considering responsibility
import PyQt4 # claimed responsibility (compiled)
Loading PyQt4
Loaded PyQt4
import PyQt4.QtCore # considering responsibility
import PyQt4.QtCore # claimed responsibility (compiled)
Loading PyQt4.QtCore
import PyQt4.QtCore # 
LoadLibraryEx("D:\01_WORK\00_PERSO\002_DEV\PYTHON\000_Svn_PythonDev\00_GestionnaireDeProd\00_EXE_Portable\V6\MainGlobalServer.dist\PyQt4\QtCore.pyd")
;
Traceback (most recent call last):
  File "D:\01_WORK\00_PERSO\002_DEV\PYTHON\000_Svn_PythonDev\00_GestionnaireDeProd\00_EXE_Portable\V6\MainGlobalServer.dist\MainGlobalServer.py", 
line 7, in <module>
ImportError: LoadLibraryEx 
'D:\01_WORK\00_PERSO\002_DEV\PYTHON\000_Svn_PythonDev\00_GestionnaireDeProd\00_EXE_Portable\V6\MainGlobalServer.dist\PyQt4\QtCore.pyd' failed
# clear __builtin__._
# clear sys.path
# clear sys.argv
# clear sys.ps1
# clear sys.ps2
# clear sys.exitfunc
# clear sys.exc_type
# clear sys.exc_value
# clear sys.exc_traceback
# clear sys.last_type
# clear sys.last_value
# clear sys.last_traceback
# clear sys.path_hooks
# clear sys.path_importer_cache
# clear sys.meta_path
# clear sys.flags
# clear sys.float_info
# restore sys.stdin
# restore sys.stdout
# restore sys.stderr
# cleanup __main__
# cleanup[1] _functools
# cleanup[1] abc
# cleanup[1] site
# cleanup[1] _warnings
# cleanup[1] _weakrefset
# cleanup[1] PyQt4
# cleanup[1] sysconfig
# cleanup[1] _weakref
# cleanup[1] traceback
# cleanup[1] nt
# cleanup[1] sre_constants
# cleanup[1] exceptions
# cleanup[1] locale
# cleanup[1] _codecs
# cleanup[1] zipimport
# cleanup[1] signal
# cleanup[1] re
# cleanup[1] _locale
# cleanup[1] operator
# cleanup[1] encodings
# cleanup[1] functools
# cleanup[1] sre_compile
# cleanup[1] encodings.cp1252
# cleanup[1] encodings.aliases
# cleanup[1] sre_parse
# cleanup[1] codecs
# cleanup[1] _sre
# cleanup[2] os
# cleanup[2] warnings
# cleanup[2] errno
# cleanup[2] linecache
# cleanup[2] _abcoll
# cleanup[2] genericpath
# cleanup[2] stat
# cleanup[2] UserDict
# cleanup[2] types
# cleanup[2] ntpath
# cleanup[2] os.path
# cleanup[2] copy_reg
# cleanup sys
# cleanup __builtin__
PyThreadState_Clear: warning: thread still has a frame
# cleanup ints: 26 unfreed ints
# cleanup floats



Second, upgrading nuitka to 0.5.22 i get this (shorter) message when the resulting app crash on start:

# installing zipimport hook
import zipimport # builtin
# installed zipimport hook
setup nuitka compiled module/bytecode/shlib importer
import site # considering responsibility
import site # claimed responsibility (compiled)
Loading site
ValueError: bad marshal data (unknown type code)

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.



And third, compiled with 0.5.19, 

Running from outside .dist doen't work but from inside it works.
Adding my .dist folder to my PATH env allows me to run it from outside.


regards,

Antoine
msg1950 (view) Author: kayhayen Date: 2016-08-16.10:37:34
First of all, I would love to have the output of --python-flag=-v when you do 
not copy the ctypes module there. No manual fixing should be needed. Retry with 
latest release, I think it got hidden dependencies added.

Second, what is the error message with latest Nuitka. That is the one I care 
about.

Third, can you try running the command inside or outside the .dist folder. The 
program tries to add itself to the library path, but might fail.

Yours,
Kay
msg1945 (view) Author: djastro Date: 2016-07-27.15:46:11
hi, 

i m quit a noob on compiling things and i find nuitka is really awsome for that, thx Kay!

i am using nuitka 0.5.19 with win 7, python 2.7 x32, mingw 32

when i create an executable with :
nuitka --mingw --standalone --recurse-all --plugin-enable=qt-plugins --output-
dir=D:\01_WORK\00_PERSO\002_DEV\PYTHON\000_Svn_PythonDev\00_GestionnaireDeProd\00_EXE_Portable\V6 MainGlobalServer.py

everything is fine! 

I juste need to copy _ctypes.pyd from my python/DLLs directory to my .dist dir to be able to run the builded executable 
on a "none python" machine.

My problem is :

i need to launch the executable from a dos commande (like a .bat, in fact i call the exe from a 3dsmax script but its 
the same)


when doing this i get an importError: LoadLibraryEx  pointing to my .dist\PyQt4\QtGui.pyd file.

i get this error when :
- draging/droping the exe in a commande prompt
- making a bat file with the path to the exe and running it

but not when in a command promt i go to my exe dir with the cd command and run it from there.

souds like a path issue maybe but i cant find how to solve it :/

i've tried v0.5.20 but the executable can just not run, it directly crash when started whith a widows error message 
APPCRASH ... so back to v0.5.19


Thanks again for this tool!
History
Date User Action Args
2018-08-23 23:22:41kayhayensetstatus: chatting -> resolved
messages: + msg2502
2016-09-11 09:43:35djastrosetmessages: + msg1966
2016-08-16 10:37:34kayhayensetstatus: unread -> chatting
messages: + msg1950
keyword: - help_wanted
2016-07-27 15:46:11djastrocreate