[python-win32] Re: Found how to use TLBs with py2exe,
anyhow problems
Thomas Heller
theller at python.net
Fri Feb 27 09:50:18 EST 2004
Andreas Maurer <pyama at snafu.de> writes:
Andreas Maurer <pyama at snafu.de> writes:
> finding in the py2exe Wiki how to import TLBs in py2exe, it still
> doesn't work.
>
> In the setup file options are set in this way:
>
> opts = {
> "py2exe": {
> "optimize": "2",
> "dist_dir": r"H:\Ablagen\py\Versionierung\bin",
> "typelibs": [('{783CD4E0-9D54-11CF-B8EE-00608CC9A71F}', 0, 5, 1)],
> }
> }
Looks ok, that's the way to do it (assuming you got the typelib id right).
> This traceback will appear:
> ---
> running py2exe
> *** generate typelib stubs ***
> Traceback (most recent call last):
> File "setupget_VSS.py", line 48, in ?
> console = [r"H:\Ablagen\py\Versionierung\get_VSS.py"],
> File "C:\PROGRA~1\Python23\Lib\distutils\core.py", line 149, in setup
> dist.run_commands()
> File "C:\PROGRA~1\Python23\Lib\distutils\dist.py", line 907, in run_commands
> self.run_command(cmd)
> File "C:\PROGRA~1\Python23\Lib\distutils\dist.py", line 927, in run_command
> cmd_obj.run()
> File "C:\PROGRA~1\Python23\Lib\site-packages\py2exe\build_exe.py", line 180,
> in run
> self.typelibs)
> File "C:\PROGRA~1\Python23\Lib\site-packages\py2exe\build_exe.py", line 1061,
> in collect_win32
> com_genpy
> sub_mod = gencache..GetModuleForCLSID(clsid)
> File "C:\PROGRA~1\Python23\Lib\site-packages\win32com\client\gencache.py",
> line 240, in GetMod
> uleForCLSID
> makepy.GenerateChildFromTypeLibSpec(sub_mod, info)
> File "C:\PROGRA~1\Python23\Lib\site-packages\win32com\client\makepy.py", line
> 306, in Generate
> ChildFromTypeLibSpec
> __import__("win32com.gen_py." + dir_name + "." + child)
> File "H:\Ablagen\py\Setups\build\bdist.win32
> \winexe\temp\win32com\gen_py\783CD4E0-9D54-11CF-B8EE-00608CC9A71Fx0x5x1
> \IVSSDatabase.py", line 27, in ?
> class IVSSDatabase(DispatchBaseClass):
> NameError: name 'DispatchBaseClass' is not defined
> ---
And this looks like you could try to debug this yourself. Can you try?
Thomas
More information about the Python-win32
mailing list