On Dec 3, 3:21 pm, "Lukasz Szybalski" <[EMAIL PROTECTED]> wrote:
> On Mon, Dec 1, 2008 at 5:22 PM, Graham Dumpleton
>
>
>
> <[EMAIL PROTECTED]> wrote:
>
> > On Dec 2, 9:11 am, "Ken Kuhlman" <[EMAIL PROTECTED]> wrote:
> >> On Thu, Nov 27, 2008 at 2:09 PM, Uwe C. Schroeder <[EMAIL PROTECTED]>
> >> wrote:
>
> >> > Hello everyone,
>
> >> > I've tried running a working TG 1.5 app under mod_wsgi.
> >> > When I start the application with the "start_application.py" script,
> >> > everything is peachy.
> >> > However, when I start the same application in mod_wsgi, toscawidgets is
> >> > not
> >> > initialized as tool, so cherrypy throws an error:
> >> > AttributeError: 'Toolbox' object has no attribute 'toscawidgets'
>
> >> > So I dug around in the code and I found that the start_extension method
> >> > in
> >> > toscawidgets.mods.tg is never called, although the file is imported
>
> >> ToscaWidgets registers itself as a TurboGears extension via the setuptools
> >> entry point
> >> "turbogears.extensions". These are run in TG's startup.startTurboGears.
>
> >> > This is my wsgi start script (this is TG 1.5 with Cherrypy 3.1):
>
> >> > import sys
> >> > sys.path.append('/home/uwe/Projects/BTG1.1/bunspace'
> >> > sys.stdout = sys.stderr
>
> >> > import site
> >> > site.addsitedir('/home/uwe/Projects/BTG1.1/lib/python2.4/site-packages')
>
> Make sure above virtual enviroment has all the necessary modules.
> Your app should work in this virtual env before you continue.
> Please read the page I link to on the bottom. The addsitedir should be
> above sys.path.append(...your app)
If this is seen as a path ordering issues, also perhaps heed recently
updated:
http://code.google.com/p/modwsgi/wiki/VirtualEnvironments
The problem is that site.addsitedir() alone doesn't really do what is
desired and you will have problems if system wide site-packages has
conflicting versions of packages/modules to what is in virtual
environment.
Look for section of document where it talks about reordering of
sys.path.
Graham
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---