Issue with python 2.6 + ticket 39 patch

52 views
Skip to first unread message

Laurent

unread,
Dec 13, 2009, 10:38:32 AM12/13/09
to PyInstaller
Hello,

I had a .exe system working on python 2.5 an dsadly we've switch to
python 2.6.
I've readen the manifest file issue on internat and manage to make
the .exe work with py2exe.
Now i want to use pyinstaller (because I want to have a true singl
e.exe file :) )

So, reading the diffeent amil, i've applied the patch in ticket 39.
Still it does not work for me.
It found the good manifest file but there is something wrong.
I get this when running the .exe in one dir mode:

Traceback (most recent call last):
...
...
...
File ".\Manager_onedir\build\pyi.win32\Manager\outPYZ1.pyz/
matplotlib.transforms", line 34, in <module>
File "C:\Project\Def\Soft\Scripts\external_apps\svn.pyinstaller.org
\iu.py", line 439, in importHook
mod = _self_doimport(nm, ctx, fqname)
File "C:\Project\Def\Soft\Scripts\external_apps\svn.pyinstaller.org
\iu.py", line 498, in doimport
mod = importfunc(nm)
File "C:\Project\Def\Soft\Scripts\external_apps\svn.pyinstaller.org
\iu.py", line 300, in getmod
mod = owner.getmod(nm)
File "C:\Project\Def\Soft\Scripts\external_apps\svn.pyinstaller.org
\archive.py", line 468, in getmod
return iu.DirOwner.getmod(self, self.prefix+'.'+nm)
File "C:\Project\Def\Soft\Scripts\external_apps\svn.pyinstaller.org
\iu.py", line 109, in getmod
mod = imp.load_module(nm, fp, attempt, (ext, mode, typ))
ImportError: DLL load failed: Le module spÚcifiÚ est introuvable.

If I copy the .dll + manifest files at the same place the .exe is I
get a R6034 error ...

The init script is going well:
Configuring pyinstaller...
I: read old config from ..\external_apps\svn.pyinstaller.org
\config.dat
I: computing EXE_dependencies
I: Analyzing C:\Python26\python.exe
I: Dependent assemblies of C:\Python26\python.exe:
I: x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.21022.8_none
I: Searching for assembly
x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.21022.8_none...
I: Found manifest C:\Windows\WinSxS\Manifests
\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.21022.8_none_bcb86ed6ac711f91.manifest
I: Searching for file msvcr90.dll
I: Found file C:\Windows\WinSxS
\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.21022.8_none_bcb86ed6ac711f91\msvcr90.dll
I: Searching for file msvcp90.dll
I: Found file C:\Windows\WinSxS
\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.21022.8_none_bcb86ed6ac711f91\msvcp90.dll
I: Searching for file msvcm90.dll
I: Found file C:\Windows\WinSxS
\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.21022.8_none_bcb86ed6ac711f91\msvcm90.dll
I: Adding Microsoft.VC90.CRT\Microsoft.VC90.CRT.manifest
I: Adding Microsoft.VC90.CRT\msvcr90.dll
I: Adding Microsoft.VC90.CRT\msvcp90.dll
I: Adding Microsoft.VC90.CRT\msvcm90.dll
...
...

but building the file gave some error:

Analyzing: ..\Manager.py
I: Analyzing C:\Python26\lib\site-packages\matplotlib\ttconv.pyd
E: Cannot parse manifest resource 2, 1033 from
E: C:\Python26\lib\site-packages\matplotlib\ttconv.pyd
E: sequence item 1: expected string, NoneType found
I: Adding python26.dll dependency of ttconv.pyd
E: lib not found: MSVCP90.dll dependency of C:\Python26\lib\site-
packages\matplotlib\ttconv.pyd
E: lib not found: MSVCR90.dll dependency of C:\Python26\lib\site-
packages\matplotlib\ttconv.pyd
I: Skipping KERNEL32.dll dependency of ttconv.pyd
I: Analyzing C:\Python26\lib\site-packages\scipy\sparse\linalg\isolve
\_iterative.pyd
I: Skipping KERNEL32.dll dependency of _iterative.pyd
I: Skipping msvcrt.dll dependency of _iterative.pyd
I: Skipping msvcrt.dll dependency of _iterative.pyd
I: Analyzing C:\Python26\lib\site-packages\scipy\sparse\linalg\dsolve
\_zsuperlu.pyd
I: Skipping KERNEL32.dll dependency of _zsuperlu.pyd
I: Skipping msvcrt.dll dependency of _zsuperlu.pyd
I: Analyzing C:\Python26\lib\site-packages\matplotlib\_delaunay.pyd
E: Cannot parse manifest resource 2, 1033 from
E: C:\Python26\lib\site-packages\matplotlib\_delaunay.pyd
E: sequence item 1: expected string, NoneType found
E: lib not found: MSVCP90.dll dependency of C:\Python26\lib\site-
packages\matplotlib\_delaunay.pyd
E: lib not found: MSVCR90.dll dependency of C:\Python26\lib\site-
packages\matplotlib\_delaunay.pyd


Any idea how to workaround this?

Thx for any direction!

Laurent

Florian Höch

unread,
Dec 13, 2009, 11:51:53 AM12/13/09
to pyins...@googlegroups.com
Thanks for the report. I didn't think of the case when there is an
invalid/empty dependentAssembly element. I attached an updated patch to
ticket #39 which should fix that issue (and also another one where loose
assembly files were stil included without manifest in some cases).

Regards,

Florian

Laurent schrieb:
> --
>
> You received this message because you are subscribed to the Google Groups "PyInstaller" group.
> To post to this group, send email to pyins...@googlegroups.com.
> To unsubscribe from this group, send email to pyinstaller...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/pyinstaller?hl=en.
>
>

Laurent

unread,
Dec 13, 2009, 12:12:34 PM12/13/09
to PyInstaller
Hi florian,

Just applied your new patch on clean r747.

Got this isssue now:

I: Analyzing C:\Python26\lib\site-packages\matplotlib\ttconv.pyd
E: Cannot parse manifest resource 2, 1033 from
E: C:\Python26\lib\site-packages\matplotlib\ttconv.pyd
E: Traceback (most recent call last):
File "C:\Users\Laurent\Projets\DTSQ\Def\Soft\Scripts\external_apps
\svn.pyinstaller.org\bindepend.py", line 352, in getAssemblies
False)
File "C:\Users\Laurent\Projets\DTSQ\Def\Soft\Scripts\external_apps
\svn.pyinstaller.org\manifest.py", line 1729, in parse_string
self.load_dom(minidom.parseString(xmlstr), initialize)
File "C:\Users\Laurent\Projets\DTSQ\Def\Soft\Scripts\external_apps
\svn.pyinstaller.org\manifest.py", line 1704, in load_dom
(self.filename, manifest.name))
TypeError: sequence item 1: expected string, NoneType found

I: Adding python26.dll dependency of ttconv.pyd
I: Skipping MSVCP90.dll dependency of ttconv.pyd
I: Skipping MSVCR90.dll dependency of ttconv.pyd
I: Skipping KERNEL32.dll dependency of ttconv.pyd
I: Analyzing C:\Python26\lib\site-packages\scipy\sparse\linalg\isolve
\_iterative.pyd
I: Skipping KERNEL32.dll dependency of _iterative.pyd
I: Skipping msvcrt.dll dependency of _iterative.pyd
I: Skipping msvcrt.dll dependency of _iterative.pyd
I: Analyzing C:\Python26\lib\site-packages\scipy\sparse\linalg\dsolve
\_zsuperlu.pyd
I: Skipping KERNEL32.dll dependency of _zsuperlu.pyd
I: Skipping msvcrt.dll dependency of _zsuperlu.pyd
I: Analyzing C:\Python26\lib\site-packages\matplotlib\_delaunay.pyd
E: Cannot parse manifest resource 2, 1033 from
E: C:\Python26\lib\site-packages\matplotlib\_delaunay.pyd
E: Traceback (most recent call last):
File "C:\Users\Laurent\Projets\DTSQ\Def\Soft\Scripts\external_apps
\svn.pyinstaller.org\bindepend.py", line 352, in getAssemblies
False)
File "C:\Users\Laurent\Projets\DTSQ\Def\Soft\Scripts\external_apps
\svn.pyinstaller.org\manifest.py", line 1729, in parse_string
self.load_dom(minidom.parseString(xmlstr), initialize)
File "C:\Users\Laurent\Projets\DTSQ\Def\Soft\Scripts\external_apps
\svn.pyinstaller.org\manifest.py", line 1704, in load_dom
(self.filename, manifest.name))
TypeError: sequence item 1: expected string, NoneType found
...
...
etc

Thx for your help :)

Florian Höch

unread,
Dec 13, 2009, 12:35:05 PM12/13/09
to pyins...@googlegroups.com
> manifest.py", line 1704, in load_dom

Interesting, as manifest.py should only have 993 lines :) Can you check
if the patch is correctly applied?

Regards,

Florian

Laurent schrieb:

Laurent Dufrechou

unread,
Dec 13, 2009, 1:21:52 PM12/13/09
to pyins...@googlegroups.com
Ha sorry!
I did a revert but it did not suppres old unmanaged files!
Cleaned up all, and now no more errors :)

On build I get no more errors.

Still, the .exe does not launch, same error, it said that it could not load a .dll
If I put the manifest file + dll at the root, still got R6034...

Do you think it still a manifest issue?
:/


2009/12/13 Florian Höch <floria...@gmx.de>

Laurent Dufrechou

unread,
Dec 13, 2009, 1:57:54 PM12/13/09
to pyins...@googlegroups.com
One point:
I've modified iu.py to display info where the dll loading make an error:
(line 107 of iu.py)
if typ == imp.C_EXTENSION:
                        fp = open(attempt, 'rb')
                        print "nm:"+str(nm)
                        print "fp:"+str(fp)
                        print "attempt:"+str(attempt)
                        print "ext:"+str(ext)
                        print "mode:"+str(mode)
                        print "typ:"+str(typ)

                       
                        mod = imp.load_module(nm, fp, attempt, (ext, mode, typ))
                   

Here is the result:

nm:matplotlib._path
fp:<open file 'C:\...\Manager_onedir\dist\Manager\matplotlib._path.pyd', mode 'rb' at 0x03798070>
attempt:C:\...\Manager_onedir\dist\Manager\matplotlib._path.pyd
ext:.pyd
mode:rb
typ:3

(all other previous file where the same for ext,mode and typ)


Traceback (most recent call last):
  File "<string>", line 16, in <module>
...
  File "C:\Users\Laurent\Projets\DTSQ\Def\Soft\Scripts\external_apps\svn.pyinstaller.org\iu.py", line 116, in getmod

    mod = imp.load_module(nm, fp, attempt, (ext, mode, typ))
ImportError: DLL load failed: Le module spÚcifiÚ est introuvable. (module not found)

I've opened an ipython shell and did:
a=open('C:\...\Manager_onedir\dist\Manager\matplotlib._path.pyd','r') and it works...

I've also tried to replace the file with the one genrated via py2exe but got the same error :)

Hope it could help...

2009/12/13 Laurent Dufrechou <laurent....@gmail.com>

Florian Höch

unread,
Dec 13, 2009, 1:59:09 PM12/13/09
to pyins...@googlegroups.com
Glad to hear atleast the build works! Regarding the exe launch error,
it's hard to tell if it is assembly-related or not. Does it mention the
dll involved?
Maybe try narrowing down the problem by generating a small test .py and
add imports one by one (try to add matplotlib last as it has several 3rd
party dependencies depending on backend used). Maybe we'll be able to
figure out which causes the error and work from there.

Regards,

Florian

Laurent Dufrechou schrieb:
> Ha sorry!
> I did a revert but it did not suppres old unmanaged files!
> Cleaned up all, and now no more errors :)
>
> On build I get no more errors.
>
> Still, the .exe does not launch, same error, it said that it could not
> load a .dll
> If I put the manifest file + dll at the root, still got R6034...
>
> Do you think it still a manifest issue?
> :/
>
>
> 2009/12/13 Florian Höch <floria...@gmx.de <mailto:floria...@gmx.de>>
>
> > manifest.py", line 1704, in load_dom
>
> Interesting, as manifest.py should only have 993 lines :) Can you check
> if the patch is correctly applied?
>
> Regards,
>
> Florian
>
> Laurent schrieb:
> > Hi florian,
> >
> > Just applied your new patch on clean r747.
> >
> > Got this isssue now:
> >
> > I: Analyzing C:\Python26\lib\site-packages\matplotlib\ttconv.pyd
> > E: Cannot parse manifest resource 2, 1033 from
> > E: C:\Python26\lib\site-packages\matplotlib\ttconv.pyd
> > E: Traceback (most recent call last):
> > File "C:\Users\Laurent\Projets\DTSQ\Def\Soft\Scripts\external_apps
> > \svn.pyinstaller.org <http://svn.pyinstaller.org>\bindepend.py",
> line 352, in getAssemblies
> > False)
> > File "C:\Users\Laurent\Projets\DTSQ\Def\Soft\Scripts\external_apps
> > \svn.pyinstaller.org <http://svn.pyinstaller.org>\manifest.py",
> line 1729, in parse_string
> > self.load_dom(minidom.parseString(xmlstr), initialize)
> > File "C:\Users\Laurent\Projets\DTSQ\Def\Soft\Scripts\external_apps
> > \svn.pyinstaller.org <http://svn.pyinstaller.org>\manifest.py",
> line 1704, in load_dom
> > (self.filename, manifest.name <http://manifest.name>))
> > TypeError: sequence item 1: expected string, NoneType found
> >
> > I: Adding python26.dll dependency of ttconv.pyd
> > I: Skipping MSVCP90.dll dependency of ttconv.pyd
> > I: Skipping MSVCR90.dll dependency of ttconv.pyd
> > I: Skipping KERNEL32.dll dependency of ttconv.pyd
> > I: Analyzing C:\Python26\lib\site-packages\scipy\sparse\linalg\isolve
> > \_iterative.pyd
> > I: Skipping KERNEL32.dll dependency of _iterative.pyd
> > I: Skipping msvcrt.dll dependency of _iterative.pyd
> > I: Skipping msvcrt.dll dependency of _iterative.pyd
> > I: Analyzing C:\Python26\lib\site-packages\scipy\sparse\linalg\dsolve
> > \_zsuperlu.pyd
> > I: Skipping KERNEL32.dll dependency of _zsuperlu.pyd
> > I: Skipping msvcrt.dll dependency of _zsuperlu.pyd
> > I: Analyzing C:\Python26\lib\site-packages\matplotlib\_delaunay.pyd
> > E: Cannot parse manifest resource 2, 1033 from
> > E: C:\Python26\lib\site-packages\matplotlib\_delaunay.pyd
> > E: Traceback (most recent call last):
> > File "C:\Users\Laurent\Projets\DTSQ\Def\Soft\Scripts\external_apps
> > \svn.pyinstaller.org <http://svn.pyinstaller.org>\bindepend.py",
> line 352, in getAssemblies
> > False)
> > File "C:\Users\Laurent\Projets\DTSQ\Def\Soft\Scripts\external_apps
> > \svn.pyinstaller.org <http://svn.pyinstaller.org>\manifest.py",
> line 1729, in parse_string
> > self.load_dom(minidom.parseString(xmlstr), initialize)
> > File "C:\Users\Laurent\Projets\DTSQ\Def\Soft\Scripts\external_apps
> > \svn.pyinstaller.org <http://svn.pyinstaller.org>\manifest.py",
> line 1704, in load_dom
> > (self.filename, manifest.name <http://manifest.name>))
> > TypeError: sequence item 1: expected string, NoneType found
> > ...
> > ...
> > etc
> >
> > Thx for your help :)
> >
> > --
> >
> > You received this message because you are subscribed to the
> Google Groups "PyInstaller" group.
> > To post to this group, send email to pyins...@googlegroups.com
> <mailto:pyins...@googlegroups.com>.
> > To unsubscribe from this group, send email to
> pyinstaller...@googlegroups.com
> <mailto:pyinstaller%2Bunsu...@googlegroups.com>.
> > For more options, visit this group at
> http://groups.google.com/group/pyinstaller?hl=en.
> >
> >
>
> --
>
> You received this message because you are subscribed to the Google
> Groups "PyInstaller" group.
> To post to this group, send email to pyins...@googlegroups.com
> <mailto:pyins...@googlegroups.com>.
> To unsubscribe from this group, send email to
> pyinstaller...@googlegroups.com
> <mailto:pyinstaller%2Bunsu...@googlegroups.com>.

Laurent Dufrechou

unread,
Dec 13, 2009, 2:07:21 PM12/13/09
to pyins...@googlegroups.com
about my last email:

I've compared the matplotlib._path.pyd with the one generated by py2exe (taht works with python2.6)
They are bit ot bit equivalent.
So I suspect more an issue with imp.load_module function?


 mod = imp.load_module(nm, fp, attempt, (ext, mode, typ))

Will continue testing things :)
If you've got any idea in the meantime, you are welcome ;)


2009/12/13 Florian Höch <floria...@gmx.de>
Glad to hear atleast the build works! Regarding the exe launch error,h

Laurent Dufrechou

unread,
Dec 13, 2009, 2:32:36 PM12/13/09
to pyins...@googlegroups.com
Hi florian,

Look this interesting thing:

In [40]: imp.load_module('matplotlib._path',a,"C:\\...\\Manager\\",('.pyd','rb',3))
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)

C:\..\Manager\<ipython console> in <module>()


ImportError: DLL load failed: Le module spÚcifiÚ est introuvable.

In [41]: a,b,c = imp.find_module('matplotlib._path')

In [42]: imp.load_module('test',a,b,c)
Out[42]: <module 'matplotlib._path' from 'matplotlib._path.pyd'>

I think there is definitively something wrong with imp.laod_module.
I'll try to patch iu.py to use find_module, and will keep you updated.

Cheers,
Laurent

Florian Höch

unread,
Dec 14, 2009, 9:45:20 AM12/14/09
to pyins...@googlegroups.com
Please add the following to your Makespec.py call:

Makespec.py <your options> --manifest msvc90dep.manifest <your script.py>

(manifest file below)

Does it work?

Regards,

Florian

Laurent Dufrechou schrieb:
msvc90dep.manifest

Laurent Dufrechou

unread,
Dec 14, 2009, 10:56:57 AM12/14/09
to pyins...@googlegroups.com
Nop does not change anything :(

Just to give you an idea:

Init:
I: Analyzing C:\Python26\lib\site-packages\PyQt4\QtCore.pyd
I: Dependent assemblies of C:\Python26\lib\site-packages\PyQt4\QtCore.pyd:
I: *_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.0.0_none,
x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.21022.8_none
I: Skipping assembly
*_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.0.0_none
I: Skipping KERNEL32.dll dependency of QtCore.pyd
...
I: Analyzing C:\Python26\lib\site-packages\sip.pyd
I: Dependent assemblies of C:\Python26\lib\site-packages\sip.pyd:
I: x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.21022.8_none
...
I: Analyzing C:\Python26\DLLs\_socket.pyd
I: Skipping WS2_32.dll dependency of _socket.pyd
I: Skipping KERNEL32.dll dependency of _socket.pyd
...
I: Analyzing C:\Python26\lib\site-packages\win32\win32file.pyd
I: Dependent assemblies of
C:\Python26\lib\site-packages\win32\win32file.pyd:
I: x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.21022.8_none
I: Skipping MSWSOCK.dll dependency of win32file.pyd
I: Skipping WS2_32.dll dependency of win32file.pyd
I: Skipping KERNEL32.dll dependency of win32file.pyd
...
I: Analyzing C:\Python26\lib\site-packages\matplotlib\_path.pyd
I: Skipping KERNEL32.dll dependency of _path.pyd

As you can see all pure C extension module got an assemblies attached to
them.
C builtin extension not but seems to be OK.

_path.pyd is a C extension where the manifest file is not ... (attached?)

Before your yesterday patch I had this with _path.py:
I: Analyzing C:\Python26\lib\site-packages\matplotlib\_path.pyd
E: Cannot parse manifest resource 2, 1033 from
E: C:\Python26\lib\site-packages\matplotlib\_path.pyd
E: sequence item 1: expected string, NoneType found

So seems your patch does not link with default assemblies.
Can we force it?

Here is a print of module loaded before crash (the last one is
matplotlib._path.pyd and make the crash...)
nm:PyQt4.QtCore
fp:<open file 'C:\Manager\PyQt4.QtCore.pyd', mode 'rb' at 0x00433840>
attempt:C:\Manager\PyQt4.QtCore.pyd
ext:.pyd
mode:rb
typ:3
nm:sip
fp:<open file 'C:/Manager\sip.pyd', mode 'rb' at 0x004338E0>
attempt:C:/Manager\sip.pyd
ext:.pyd
mode:rb
typ:3
nm:_socket
fp:<open file 'C:/Manager\_socket.pyd', mode 'rb' at 0x004E47F0>
attempt:C:/Manager\_socket.pyd
ext:.pyd
mode:rb
typ:3
nm:_ssl
fp:<open file 'C:/Manager\_ssl.pyd', mode 'rb' at 0x004E47F0>
attempt:C:/Manager\_ssl.pyd
ext:.pyd
mode:rb
typ:3
nm:_ctypes
fp:<open file 'C:/Manager\_ctypes.pyd', mode 'rb' at 0x004E4890>
attempt:C:/Manager\_ctypes.pyd
ext:.pyd
mode:rb
typ:3
nm:win32file
fp:<open file 'C:/Manager\win32file.pyd', mode 'rb' at 0x004E4ED0>
attempt:C:/Manager\win32file.pyd
ext:.pyd
mode:rb
typ:3
nm:win32event
fp:<open file 'C:/Manager\win32event.pyd', mode 'rb' at 0x004E4ED0>
attempt:C:/Manager\win32event.pyd
ext:.pyd
mode:rb
typ:3
nm:numpy.core.multiarray
fp:<open file 'C:\Manager\numpy.core.multiarray.pyd', mode 'rb' at
0x0279E700>
attempt:C:\Manager\numpy.core.multiarray.pyd
ext:.pyd
mode:rb
typ:3
nm:numpy.core.umath
fp:<open file 'C:\Manager\numpy.core.umath.pyd', mode 'rb' at 0x0279E700>
attempt:C:\Manager\numpy.core.umath.pyd
ext:.pyd
mode:rb
typ:3
nm:numpy.core._sort
fp:<open file 'C:\Manager\numpy.core._sort.pyd', mode 'rb' at 0x0279EA70>
attempt:C:\Manager\numpy.core._sort.pyd
ext:.pyd
mode:rb
typ:3
nm:numpy.core._dotblas
fp:<open file 'C:\Manager\numpy.core._dotblas.pyd', mode 'rb' at 0x0279EC50>
attempt:C:\Manager\numpy.core._dotblas.pyd
ext:.pyd
mode:rb
typ:3
nm:numpy.core.scalarmath
fp:<open file 'C:\Manager\numpy.core.scalarmath.pyd', mode 'rb' at
0x0298D520>
attempt:C:\Manager\numpy.core.scalarmath.pyd
ext:.pyd
mode:rb
typ:3
nm:numpy.lib._compiled_base
fp:<open file 'C:\Manager\numpy.lib._compiled_base.pyd', mode 'rb' at
0x029E72F0>
attempt:C:\Manager\numpy.lib._compiled_base.pyd
ext:.pyd
mode:rb
typ:3
nm:numpy.linalg.lapack_lite
fp:<open file 'C:\Manager\numpy.linalg.lapack_lite.pyd', mode 'rb' at
0x029E7840>
attempt:C:\Manager\numpy.linalg.lapack_lite.pyd
ext:.pyd
mode:rb
typ:3
nm:numpy.fft.fftpack_lite
fp:<open file 'C:\Manager\numpy.fft.fftpack_lite.pyd', mode 'rb' at
0x0279E340>
attempt:C:\Manager\numpy.fft.fftpack_lite.pyd
ext:.pyd
mode:rb
typ:3
nm:numpy.random.mtrand
fp:<open file 'C:\Manager\numpy.random.mtrand.pyd', mode 'rb' at 0x0279E340>
attempt:C:\Manager\numpy.random.mtrand.pyd
ext:.pyd
mode:rb
typ:3
nm:select
fp:<open file 'C:/Manager\select.pyd', mode 'rb' at 0x02AD5E30>
attempt:C:/Manager\select.pyd
ext:.pyd
mode:rb
typ:3
nm:PyQt4.QtGui
fp:<open file 'C:\Manager\PyQt4.QtGui.pyd', mode 'rb' at 0x02C0B0C0>
attempt:C:\Manager\PyQt4.QtGui.pyd
ext:.pyd
mode:rb
typ:3
nm:_tkinter
fp:<open file 'C:/Manager\_tkinter.pyd', mode 'rb' at 0x0330DA70>
attempt:C:/Manager\_tkinter.pyd
ext:.pyd
mode:rb
typ:3
nm:_imaging
fp:<open file 'C:/Manager\_imaging.pyd', mode 'rb' at 0x0330DA70>
attempt:C:/Manager\_imaging.pyd
ext:.pyd
mode:rb
typ:3
nm:matplotlib._path
fp:<open file 'C:\Manager\matplotlib._path.pyd', mode 'rb' at 0x03615070>
attempt:C:\Manager\matplotlib._path.pyd
ext:.pyd
mode:rb
typ:3
>>> crash


Florian Höch

unread,
Dec 14, 2009, 11:14:57 AM12/14/09
to pyins...@googlegroups.com
> I: Analyzing C:\Python26\lib\site-packages\matplotlib\_path.pyd
> E: Cannot parse manifest resource 2, 1033 from
> E: C:\Python26\lib\site-packages\matplotlib\_path.pyd
> E: sequence item 1: expected string, NoneType found

Is this mylatest patch? It should print the full traceback.

Regards,

Florian

Laurent Dufrechou schrieb:

Laurent Dufrechou

unread,
Dec 14, 2009, 11:21:20 AM12/14/09
to pyins...@googlegroups.com
No,no is was previous one, there was a bug in it.

What I mean is I think that 13/12/09 patch does not its work correctly (well
I think) since usually a C_extension module outputs:
> I: Analyzing C:\Python26\lib\site-packages\XXXXX.pyd
> I: Dependent assemblies of C:\Python26\lib\site-packages\XXXXX.pyd:
> I: x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.21022.8_none

And math._path indicate this (patch 13/12/09):
> I: Analyzing C:\Python26\lib\site-packages\matplotlib\_path.pyd
> I: Skipping KERNEL32.dll dependency of _path.pyd

And strangely the one that does not load correctly today is the one that
_had_ this error: (patch _before_ 13/12)
> E: Cannot parse manifest resource 2, 1033 from
> E: C:\Python26\lib\site-packages\matplotlib\_path.pyd
> E: sequence item 1: expected string, NoneType found

Regards,
Laurent

-----Message d'origine-----
De : pyins...@googlegroups.com [mailto:pyins...@googlegroups.com] De
la part de Florian Höch
Envoyé : lundi 14 décembre 2009 17:15
À : pyins...@googlegroups.com
Objet : Re: [PyInstaller] Re: Issue with python 2.6 + ticket 39 patch

Florian Höch

unread,
Dec 14, 2009, 11:36:19 AM12/14/09
to pyins...@googlegroups.com
> What I mean is I think that 13/12/09 patch does not its work correctly (well
> I think) since usually a C_extension module outputs:
>> I: Analyzing C:\Python26\lib\site-packages\XXXXX.pyd
>> I: Dependent assemblies of C:\Python26\lib\site-packages\XXXXX.pyd:
>> I: x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.21022.8_none

You'll never see output like that when _math.pyd is analyzed because it
does not have any dependent assemblies. Actually its embedded manifest
is malformed (it contains an empty dependentAssembly element - the 13/12
patch works around this issue by ignoring the incomplete part). You
definitely need to use the 13/12 patch, also because of the other error
that was fixed (possibility of assembly files without manifest slipping in).

Regards,

Florian

Laurent Dufrechou

unread,
Dec 14, 2009, 12:42:51 PM12/14/09
to pyins...@googlegroups.com
Ok it makes sense.
For info, I only use the 13/12 patch.
So why the _math.pyd does not want to load via imp.load_module.... ?_?
I've started to take a look at what py2exe do, but they do not seem to use
imp.load_module for c_extension...
If you've got any idea why _math.pyd does not load while other does (pyqt
etc...)...
I'll try to do a little testcase...

Laurent


-----Message d'origine-----
De : pyins...@googlegroups.com [mailto:pyins...@googlegroups.com] De
la part de Florian Höch
Envoyé : lundi 14 décembre 2009 17:36
À : pyins...@googlegroups.com
Objet : Re: [PyInstaller] Re: Issue with python 2.6 + ticket 39 patch

Florian Höch

unread,
Dec 14, 2009, 12:49:13 PM12/14/09
to pyins...@googlegroups.com
Have you tried my suggestion from a previous mail (--manfest option with
attached file to Makespec.py in addition to the patch)? This solved the
issue for me (Vista).

Regards,

Florian

Laurent Dufrechou schrieb:

Laurent Dufrechou

unread,
Dec 14, 2009, 5:15:27 PM12/14/09
to pyins...@googlegroups.com
Yep I've tried it, all report done today where done with --manifest option +
latest patch.
That's really strange that only matplotlib._path don't pass :(



-----Message d'origine-----
De : pyins...@googlegroups.com [mailto:pyins...@googlegroups.com] De
la part de Florian Höch
Envoyé : lundi 14 décembre 2009 18:49

Laurent Dufrechou

unread,
Dec 16, 2009, 5:48:11 PM12/16/09
to pyins...@googlegroups.com

Hi florian,

This night, I’ve cleaned up all my directory, reapplied the patch and…

It works!

 

J

In fact there was a mess on my system install mixing python25 and python26….

 

Anyhow, your latest patch 13/12/2009 is perfect!

 

My program use a lot of libs, matplotlib/pyqt4/numpy/scipy and all manifest are OK J

Even the one file creation is working packing all .dll inside the .Exe!

 

Gooooood job!

 

You can include it in the main tree ;)

 

Ps:

Makespec.py ..\%name%.py --manifest msvc90dep.manifest is MANDATORY without it I got DLL import error.

Can this be done automagically for the user?

 

De : Laurent Dufrechou [mailto:laurent....@gmail.com]
Envoyé : dimanche 13 décembre 2009 20:33


À : pyins...@googlegroups.com
Objet : Re: [PyInstaller] Re: Issue with python 2.6 + ticket 39 patch

 

Hi florian,

Laurent

unread,
Dec 16, 2009, 5:53:23 PM12/16/09
to PyInstaller
By the way,
My current system is windows seven x64 runnning 32bit python.
So we can say your patch is validated for seven 32bit ;).

++

Florian Höch

unread,
Dec 17, 2009, 9:57:53 AM12/17/09
to pyins...@googlegroups.com
Hi Laurent,

good to hear you got it sorted. I thought it should work, but one can
never be too sure until someone else on another system confirms stuff :)

Regarding adding a manifest to the pyinstaller generated exe
automagically, I'll consider it. There's one problem, which arises in
one-file exe mode: The MSVCRT90 assembly has also to be copied next to
the executable -or- the redistributable needs to be installed, so, no
'true' one-file exe's anymore - atleast when using matplotlib. The
interesting thing is, that a manifest in the exe is not needed when
including most other 3rd-party modules e.g. numpy or PyQt, and
python's standard library. So it'd be interesting to find out what's
different in matplotlib from the other modules. Maybe I could somehow
add that a manifest is needed by matplotlib to its import hook. I'll
think about it.

Regards,

Florian

PS: As I'm just the patch contributor, it's up to Giovanni Bajo
to decide when/if it's included, I think currently it is postponed to
pyinstaller 1.5 (which is fine by me, as obviously there are still some
things to iron out :))

Laurent Dufrechou schrieb:


> Hi florian,
>
> This night, I’ve cleaned up all my directory, reapplied the patch and…
>
> It works!
>
>
>
> J
>
> In fact there was a mess on my system install mixing python25 and python26….
>
>
>
> Anyhow, your latest patch 13/12/2009 is perfect!
>
>
>
> My program use a lot of libs, matplotlib/pyqt4/numpy/scipy and all
> manifest are OK J
>
> Even the one file creation is working packing all .dll inside the .Exe!
>
>
>
> Gooooood job!
>
>
>
> You can include it in the main tree ;)
>
>
>
> Ps:
>
> Makespec.py ..\%name%.py --manifest msvc90dep.manifest is MANDATORY
> without it I got DLL import error.
>
> Can this be done automagically for the user?
>
>
>

> *De :* Laurent Dufrechou [mailto:laurent....@gmail.com]
> *Envoyé :* dimanche 13 décembre 2009 20:33
> *À :* pyins...@googlegroups.com
> *Objet :* Re: [PyInstaller] Re: Issue with python 2.6 + ticket 39 patch


>
>
>
> Hi florian,
>
> Look this interesting thing:
>
> In [40]:
> imp.load_module('matplotlib._path',a,"C:\\...\\Manager\\",('.pyd','rb',3))
> ---------------------------------------------------------------------------
> ImportError Traceback (most recent call last)
>
> C:\..\Manager\<ipython console> in <module>()
>
> ImportError: DLL load failed: Le module spÚcifiÚ est introuvable.
>
> In [41]: a,b,c = imp.find_module('matplotlib._path')
>
> In [42]: imp.load_module('test',a,b,c)
> Out[42]: <module 'matplotlib._path' from 'matplotlib._path.pyd'>
>
> I think there is definitively something wrong with imp.laod_module.
> I'll try to patch iu.py to use find_module, and will keep you updated.
>
> Cheers,
> Laurent
>

Laurent Dufrechou

unread,
Dec 17, 2009, 11:05:19 AM12/17/09
to pyins...@googlegroups.com
Ha thx for the redistribuable explanation :)
I'll say to my users to install it on need!

-----Message d'origine-----
De : pyins...@googlegroups.com [mailto:pyins...@googlegroups.com] De
la part de Florian Höch

Envoyé : jeudi 17 décembre 2009 15:58
À : pyins...@googlegroups.com
Objet : Re: [PyInstaller] Re: Issue with python 2.6 + ticket 39 patch

Reply all
Reply to author
Forward
0 new messages