Hello everybody, I have a project running on TG 1.1 using TG's webd, which I would need to migrate to 1.5 as I would like to use CherrPy 3 to benefit from the WSGI.
My first approach was to setup everything using virtualenv as described on the docs for 1.5. Then I quickstarted a project, and immediately after I tried configuring apache with wsgi for that project as described in http://code.google.com/p/modwsgi/wiki/IntegrationWithTurboGears. When trying to open the site, I get: Traceback (most recent call last): File "/mnt/sda5/vodo/vodo-1.5-env/lib/python2.6/site-packages/ cherrypy/_cprequest.py", line 622, in respond self.namespaces(self.config) File "/mnt/sda5/vodo/vodo-1.5-env/lib/python2.6/site-packages/ cherrypy/lib/reprconf.py", line 101, in __call__ exit(None, None, None) File "/mnt/sda5/vodo/vodo-1.5-env/lib/python2.6/site-packages/ cherrypy/_cptools.py", line 446, in __exit__ tool = getattr(self, name) AttributeError: 'Toolbox' object has no attribute 'visit' So I've tried disabling the visit framework: turbogears.config.update({'global': {'visit.on': False}}) And now I get the following about 'genshi not found': Traceback (most recent call last): File "/mnt/sda5/vodo/vodo-1.5-env/lib/python2.6/site-packages/ cherrypy/_cprequest.py", line 645, in respond response.body = self.handler() File "/mnt/sda5/vodo/vodo-1.5-env/lib/python2.6/site-packages/ cherrypy/lib/encoding.py", line 188, in __call__ self.body = self.oldhandler(*args, **kwargs) File "/mnt/sda5/vodo/vodo-1.5-env/lib/python2.6/site-packages/ cherrypy/_cpdispatch.py", line 29, in __call__ return self.callable(*self.args, **self.kwargs) File "<string>", line 3, in index File "/mnt/sda5/vodo/vodo-1.5-env/lib/python2.6/site-packages/ turbogears/controllers.py", line 360, in expose *args, **kw) File "/mnt/sda5/vodo/vodo-1.5-env/lib/python2.6/site-packages/ turbogears/database.py", line 422, in run_with_transaction @abstract() File "<generated code>", line 0, in run_with_transaction File "/mnt/sda5/vodo/vodo-1.5-env/lib/python2.6/site-packages/ turbogears/database.py", line 444, in so_rwt retval = func(*args, **kw) File "/mnt/sda5/vodo/vodo-1.5-env/lib/python2.6/site-packages/ turbogears/controllers.py", line 244, in _expose @abstract() File "<generated code>", line 0, in _expose File "/mnt/sda5/vodo/vodo-1.5-env/lib/python2.6/site-packages/ turbogears/controllers.py", line 389, in <lambda> fragment, options, args, kw))) File "/mnt/sda5/vodo/vodo-1.5-env/lib/python2.6/site-packages/ turbogears/controllers.py", line 451, in _execute_func fragment, **options) File "/mnt/sda5/vodo/vodo-1.5-env/lib/python2.6/site-packages/ turbogears/controllers.py", line 104, in _process_output headers=headers, fragment=fragment, **options) File "/mnt/sda5/vodo/vodo-1.5-env/lib/python2.6/site-packages/ turbogears/view/base.py", line 150, in render engine, template, engine_name = _choose_engine(template) File "/mnt/sda5/vodo/vodo-1.5-env/lib/python2.6/site-packages/ turbogears/view/base.py", line 108, in _choose_engine "Template engine %s is not installed" % enginename) KeyError: 'Template engine genshi is not installed' After many hours searching around and trying different stuff, I tried to setup everything system-wide, without virtualenv, but the problem is the same. I have tried things like within my apache config and tg.wsgi script: WSGIPythonHome /mnt/sda5/vodo/vodo-1.5-env WSGIDaemonProcess localhost user=www-data group=www-data python-path=/ mnt/sda5/vodo/vodo-1.5-env/lib/python2.6/site-packages (also with the same user/group the virtualenv and project have) site.addsitedir('/mnt/sda5/vodo/vodo-1.5-env/lib/python2.6/site- packages') and some other stuff as well. The site works with TG's own web daemon, so the problem seems to be related to WSGI. Additionally it seems that this part of the IntegrationWithTurbogears doc is wrong: if cherrypy.server.state == 0: atexit.register(cherrypy.server.stop) cherrypy.server.start(init_only=True, server_class=None) application = cherrypy._cpwsgi.wsgiApp I got errors I can't exactly recall right now, but had to adapt that part to be: import wiki.controllers cherrypy.root = wiki.controllers.Root() if cherrypy.engine.state == 0: atexit.register(cherrypy.server.stop) cherrypy.server.start(init_only=True, server_class=None) application = cherrypy.tree.mount(cherrypy.root, "/wiki") cherrypy.server.state didn't exist cherrypy._cpwsgi either Maybe the problem I'm facing has something to do with those changes I had to do and therefore cherrpy/tg is not finding the right paths? What could be wrong? I'd really appreciate much if someone could give some light here. Thanks in advance! Rama -- You received this message because you are subscribed to the Google Groups "TurboGears" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/turbogears?hl=en.

