Cannot register dll created using "py2exe --com-dll"

Jordan Tucker jtuc at ev1.net
Tue Jul 29 16:35:11 CEST 2003


> I'm feeling quite dumb this morning.
> 

Don't feel dumb, I'm having the same error. The sample server builds
fine for me, both inproc and localserver. But when I try to convert
our COM server EXE to an inproc dll, I get the same error as you. I
figured it was something going wrong on the python side, so I
redirected stdout to a file and got this:

Traceback (most recent call last):
  File "<string>", line 1, in ?
  File "<string>", line 56, in DllRegisterServer
  File "win32com\server\register.pyc", line 388, in RegisterClasses
AttributeError: 'module' object has no attribute 'argv'

The offending line of code at 388 is:
      scriptDir = os.path.split(sys.argv[0])[0]

Somehow sys is no longer sys :) I planned to track it down this
morning and post a report/fix, but I checked the newsgroup first.
Seems like Thomas and Mark can have a go at it now too :p

Jordan




More information about the Python-list mailing list