Problem with install TG app as windows service

8 views
Skip to first unread message

SAGA

unread,
Dec 5, 2006, 7:29:49 AM12/5/06
to TurboGears
I am trying to start TG app as windows service. I follow the
instruction as this page: http://docs.turbogears.org/1.0/WindowsService

I create a TEST123 proj using tg-admin and put the service.py into the
dir. Because the service.py is in the same dir of the proj base, so I
do not have to modify it.

After install the service via: python service.py install, the service
can not be started. The executable parameter for the service is
"C:\Wapp\Python24\lib\site-packages\win32\PythonService.exe".

I try to debug the service by:
C:\Wapp\Python24\lib\site-packages\win32\PythonService.exe -debug
TEST123. Here is the output:

-----------------------------------------------------------------------------------------------------------------------------
Error 0xC0000003 - The instance's SvcRun() method failed

File
"C:\wapp\Python24\Lib\site-packages\win32\lib\win32serviceutil.py",
line 785, in SvcRun
self.SvcDoRun()
File "C:\wapp\Python24\test\TEST123\service.py", line 106, in
SvcDoRun
self.tg_init()
File "C:\wapp\Python24\test\TEST123\service.py", line 140, in tg_init
modulename=TGWindowsService.config_module)
File
"c:\wapp\python24\lib\site-packages\TurboGears-1.0b2-py2.4.egg\turbogears\config.py",
line 206, in update_config
configdict = config_obj(configfile, modulename).dict()
File
"c:\wapp\python24\lib\site-packages\TurboGears-1.0b2-py2.4.egg\turbogears\config.py",
line 169, in config_obj
modname + ".cfg")
File
"c:\wapp\python24\lib\site-packages\setuptools-0.6c3-py2.4.egg\pkg_resources.py",
line 799, in resource_filename
return get_provider(package_or_requirement).get_resource_filename(
File
"c:\wapp\python24\lib\site-packages\setuptools-0.6c3-py2.4.egg\pkg_resources.py",
line 119, in get_provider
__import__(moduleOrReq)

exceptions.ImportError: No module named TEST123
---------------------------------------------------------------------------------------------------------------------------------

Please give me some hint what this means? How should I fix it?
Just start to play with TurboGears. Any help are sincerely appreciated.


Best Regards

Ken

Joost Moesker

unread,
Dec 5, 2006, 7:12:09 PM12/5/06
to TurboGears
I'm guessing here, but try running 'setup.py dev' to add the package
to the sys.path (i'm assuming youre testing this on a dev machine).
Normally when you deploy with an .egg the packages is automatically
added to the sys.path.

We have deployed turbogears as service using the same script without
any problems.

Reply all
Reply to author
Forward
0 new messages