[Twisted-Python] Could not create and run a Windows Service with Twisted 2.0.1 & Python 2.4.1

Cory Dodt corydodt at twistedmatrix.com
Fri Jul 8 10:53:12 EDT 2005

Hash: SHA1

Luc, it's very common to get these near code that uses namedAny or named* from
reflect.  Using these calls guarantees that py2exe's module finding algorithm
won't know to bundle the named module.

You just need an "includes" line in your setup for twisted.internet.default.


Luc Stepniewski wrote:
| I've written a Twisted Windows Service which works perfectly with Twisted 1.3
| and Python 2.3. I've used the sandboxed ntsvc from moonfallen's svn.
| I upgraded everything to Twisted 2.0.1 and Python 2.4.1 (even tried
| ActiveState's), and followed the information provided in moonfallen's
| README-service (that is, patch pywin32's boot_service.py).
| It compiles correctly to a .exe, without any supplementary error and I can
| install it correctly as a service (using 'xxxxxx.exe -install'). But When I
| try to launch it (in the GUI Service), it dies immediately, putting the
| following message in the Windows Event Observer:
| The instance's SvcRun() method failed
|   File "win32serviceutil.pyc", line 742, in SvcRun
|   File "ntsvc\runner.pyc", line 79, in SvcDoRun
|   File "ntsvc\runner.pyc", line 48, in run
|   File "twisted\application\app.pyc", line 31, in installReactor
|   File "twisted\python\reflect.pyc", line 344, in namedModule
| exceptions.ImportError: No module named default
| I even cleaned my code to have just a .tac with 2 lines, and it does the same
| error. So I'm pretty sure it's not a problem in my code.
| Has anyone managed to create and run a service with Python 2.4.1 & Twisted
| 2.0.1? I'm using py2exe 0.5.4 and pywin32 204 both for python 2.4.
| Thanks,
| Luc
| ------------------------------------------------------------------------
| _______________________________________________
| Twisted-Python mailing list
| Twisted-Python at twistedmatrix.com
| http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Version: GnuPG v1.2.1 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org


More information about the Twisted-Python mailing list