I forgot to mention that all of this testing of r1641 of PyInstaller was done with the hook I created for OpenCV in place. hook-cv.py consists only of the line: hiddenimports = ["numpy"]
On Oct 9, 2:45 pm, Brian <[email protected]> wrote: > test_multiprocess.py works unpackaged > > test_multiprocess.py does not work when built with --onedir > PS C:\Users\b\p\tst\d\pyinstaller-r1641> .\_test_multiprocess\dist > \_test_multiprocess\_test_multiprocess.exe > pyb > pyb > PS C:\Users\b\p\tst\d\pyinstaller-r1641> SendeventProcess > SendeventProcess > Traceback (most recent call last): > File "C:\Users\b\p\tst\d\pyinstaller-r1641\_test_multiprocess\build > \pyi.win32\_test_multiprocess\outPYZ1.pyz\multiprocessing.queues", > line 238, in _feed > IOError: [Errno 6] The handle is invalid > PS C:\Users\b\p\tst\d\pyinstaller-r1641> .\_test_multiprocess\dist > \_test_multiprocess\_test_multiprocess.exe > pyb > pyb > PS C:\Users\b\p\tst\d\pyinstaller-r1641> SendeventProcess > Process SendeventProcess-1: > Traceback (most recent call last): > File "C:\Users\b\p\tst\d\pyinstaller-r1641\_test_multiprocess\build > \pyi.win32\_test_multiprocess\outPYZ1.pyz\multiprocessing.process", > line 232, in _bootstrap > File "<string>", line 13, in run > File "C:\Users\b\p\tst\d\pyinstaller-r1641\_test_multiprocess\build > \pyi.win32\_test_multiprocess\outPYZ1.pyz\multiprocessing.queues", > line 75, in put > WindowsError: [Error 5] Access is denied > > test_multiprocess.py does not work when built with --onefile > PS C:\Users\b\p\tst\d\pyinstaller-r1641> .\_test_multiprocess\dist > \_test_multiprocess.exe > pyb > pyb > PS C:\Users\b\p\tst\d\pyinstaller-r1641> SendeventProcess > SendeventProcess > Traceback (most recent call last): > File "C:\Users\b\p\tst\d\pyinstaller-r1641\_test_multiprocess\build > \pyi.win32\_test_multiprocess\outPYZ1.pyz\multiprocessing.queues", > line 238, in _feed > IOError: [Errno 6] The handle is invalid > > PS C:\Users\b\p\tst\d\pyinstaller-r1641> .\_test_multiprocess\dist > \_test_multiprocess.exe > pyb > pyb > PS C:\Users\b\p\tst\d\pyinstaller-r1641> SendeventProcess > Process SendeventProcess-1: > Traceback (most recent call last): > File "C:\Users\b\p\tst\d\pyinstaller-r1641\_test_multiprocess\build > \pyi.win32\_test_multiprocess\outPYZ1.pyz\multiprocessing.process", > line 232, in _bootstrap > File "<string>", line 13, in run > File "C:\Users\b\p\tst\d\pyinstaller-r1641\_test_multiprocess\build > \pyi.win32\_test_multiprocess\outPYZ1.pyz\multiprocessing.queues", > line 75, in put > WindowsError: [Error 5] Access is denied > > test_multiprocess_2.2.py works unpackaged > > test_multiprocess_2.2.py does not work when packaged with --onedir > PS C:\Users\b\p\tst\d\pyinstaller-r1641> .\_test_multiprocess_22\dist > \_test_multiprocess_22\_test_multiprocess_22.exe > pyb > pyb > PS C:\Users\b\p\tst\d\pyinstaller-r1641> Traceback (most recent call > last): > File "<string>", line 3, in <module> > File "C:\Users\b\p\tst\d\pyinstaller-r1641\PyInstaller\iu.py", line > 424, in importHook > mod = _self_doimport(nm, ctx, fqname) > File "C:\Users\b\p\tst\d\pyinstaller-r1641\PyInstaller\iu.py", line > 493, in doimport > mod = director.getmod(nm) > File "C:\Users\b\p\tst\d\pyinstaller-r1641\PyInstaller\iu.py", line > 285, in getmod > mod = owner.getmod(nm) > File "C:\Users\b\p\tst\d\pyinstaller-r1641\PyInstaller\archive.py", > line 439, in getmod > localpath:ExtInPkgImporter(localpath, nm)}, > File "C:\Users\b\p\tst\d\pyinstaller-r1641\PyInstaller\archive.py", > line 456, in __init__ > iu.DirOwner.__init__(self, path) > File "C:\Users\b\p\tst\d\pyinstaller-r1641\PyInstaller\iu.py", line > 71, in __init__ > raise OwnerError("%s is not a directory" % path) > iu.OwnerError: <OwnerError --dummy- is not a directory> > > When I change the line in test_multiprocess_2.2.py containing 'dummy' > to this: > os.putenv('_MEIPASS2', os.path.dirname(os.path.abspath(__file__)) + ' > ') > > the executable works with --onedir, but this message appears with -- > onefile: > PS C:\Users\b\p\tst\d\pyinstaller-r1641> .\_test_multiprocess_22b\dist > \_test_multiprocess_22b.exe > pyb > pyb > Error loading Python DLL: C:\Users\b\p\tst\d\pyinstaller-r1641 > python27.dll (error code 126) > > When I change the line to this: > os.putenv('_MEIPASS2', os.path.dirname(os.path.abspath(__file__))) > the --onefile build fails like this: > PS C:\Users\b\p\tst\d\pyinstaller-r1641> .\_test_multiprocess_22c\dist > \_test_multiprocess_22c.exe > pyb > pyb > Error loading Python DLL: C:\Users\b\p\tst\d\pyinstaller- > r1641python27.dll (error code 126) > > Notice the presence of a space between "pyinstaller-r1641" and > "python27.dll" and the lack of one in the error message of the second > build. > > I have not been able to reproduce the error about the key. > > On Oct 9, 1:15 pm, Hartmut Goebel <[email protected]> wrote: > > > > > > > > > Hi Brain, > > > > I changed the code to this: > > > Thanks, but I'm still missing quite a lot of information: > > > * Is Martins code (test_multiprocess.py) a vailid testcase? (This > > is:works unpackaged, works packages as --onedir, but fails > > packages as --onfile) > > * Does my code (test_multiprocess_2.2.py) works if run unpackaged? > > Does is run when packages as --onedir? > > * If not: what are the exact error messages? > > > > Doing so caused an error (from PyInstaller code, IIRC) about a key not > > > This is quite a difference! You should first make the code running > > unpackaged. There is no use in packaging code which does not even work > > unpackaged. > > > > being in a dictionary ('_Popen' being the key, and the class the > > > dictionary?) > > > I plain do not understand this. Please post the exact error message. > > > > I don't know what value of _MEIPASS2 should be used. Notice that I > > > The value is not of any matter. The boadloader code just checks for the > > existence of this environment variable. > > > -- > > Schönen Gruß - Regards > > Hartmut Goebel > > Dipl.-Informatiker (univ.), CISSP, CSSLP > > > Goebel Consult > > Spezialist für IT-Sicherheit in komplexen > > Umgebungenhttp://www.goebel-consult.de > > > Monatliche Kolumne:http://www.cissp-gefluester.de/ > > Goebel Consult ist Mitglied beihttp://www.7-it.de -- You received this message because you are subscribed to the Google Groups "PyInstaller" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/pyinstaller?hl=en.
