py2exe Error creating NT Service

Harald Schneider h_schneider at marketmix.com
Fri Sep 27 07:20:54 EDT 2002


Hi,

got an error with py2exe when trying to create a Win32 service:

.
changing back to 'C:\WORK\Software\Python\xqmagent'
creating dist\xqmagentwin\xqmagentwin.exe
Traceback (most recent call last):
  File "C:\WORK\Software\Python\xqmagent\setup.py", line 10, in ?
    scripts=['xqmagentwin.py'])
  File "C:\usr\python\lib\distutils\core.py", line 138, in setup
    dist.run_commands()
  File "C:\usr\python\lib\distutils\dist.py", line 899, in run_commands
    self.run_command(cmd)
  File "C:\usr\python\lib\distutils\dist.py", line 919, in run_command
    cmd_obj.run()
  File "C:\usr\python\py2exe\build_exe.py", line 626, in run
    self.create_exe(exe_name, arcname, use_runw)
  File "C:\usr\python\py2exe\build_exe.py", line 823, in create_exe
    svc_name, svc_display_name, svc_deps = self.get_service_names()
  File "C:\usr\python\py2exe\build_exe.py", line 898, in get_service_names
    exec compile(open(self.script).read(), self.script, "exec") in
mod.__dict__
  File "<string>", line 101

SyntaxError: invalid syntax


The py2exe service sample compiles perfect on my machine, but this script
here does not. There are no differences in the class derived from the
service framework.

Any ideas?

All the best,
Harald







More information about the Python-list mailing list