Hello all,

We are trying to deploy several TG2 applications behind a single same
Apache server, with mod_wsgi. Using modwsgi_deploy worked pretty well,
and the point we are at now is the following:
- each application works fine on its own behind paster and/or apache
w/ mod_wsgi
- when accessing one application, then the other always produces the
error shown below for the second application, whatever the order is
done in. As long as we stay on one given app, there doesn't seem to be
a problem. However as soon as we switch app, the problem arises and
won't go away until we reload apache. Both apps are very similar in
the way they use permissions and sqlite DBs, and present the same
error after being loaded after the other.

We didn't try to setup anything using virtualenv, just installed the
TG2 apps directly on the system (system-wide). The error seems to
indicate there is a conflict of columns in the DB but both apps are
configured to use separate sqlite files so I don't see how this could
be causing the problem.
If you had any insight on what might be causing this very weird issue,
I would be very very grateful.

Yannick

Here is the error log:

( We have /usr/local/turbogears/qubic.medias a symbolic link pointing
to /home/user/src/qubic_integration/tg2/qubic.medias/qubic.medias/ )

[Wed Jul 07 18:02:31 2010] [error] [client 192.168.0.4] mod_wsgi
(pid=3067): Target WSGI script '/usr/local/turbogears/qubic.medias/
apache/qubic.medias.wsgi' cannot be loaded as Python module.
[Wed Jul 07 18:02:31 2010] [error] [client 192.168.0.4] mod_wsgi
(pid=3067): Exception occurred processing WSGI script '/usr/local/
turbogears/qubic.medias/apache/qubic.medias.wsgi'.
[Wed Jul 07 18:02:31 2010] [error] [client 192.168.0.4] Traceback
(most recent call last):
[Wed Jul 07 18:02:31 2010] [error] [client 192.168.0.4]   File "/usr/
local/turbogears/qubic.medias/apache/qubic.medias.wsgi", line 48, in
<module>
[Wed Jul 07 18:02:31 2010] [error] [client 192.168.0.4]
application = loadapp('config:/usr/local/turbogears/qubic.medias/
production.ini')
[Wed Jul 07 18:02:31 2010] [error] [client 192.168.0.4]   File "/usr/
local/lib/python2.6/dist-packages/PasteDeploy-1.3.3-py2.6.egg/paste/
deploy/loadwsgi.py", line 204, in loadapp
[Wed Jul 07 18:02:31 2010] [error] [client 192.168.0.4]     return
loadobj(APP, uri, name=name, **kw)
[Wed Jul 07 18:02:31 2010] [error] [client 192.168.0.4]   File "/usr/
local/lib/python2.6/dist-packages/PasteDeploy-1.3.3-py2.6.egg/paste/
deploy/loadwsgi.py", line 224, in loadobj
[Wed Jul 07 18:02:31 2010] [error] [client 192.168.0.4]
global_conf=global_conf)
[Wed Jul 07 18:02:31 2010] [error] [client 192.168.0.4]   File "/usr/
local/lib/python2.6/dist-packages/PasteDeploy-1.3.3-py2.6.egg/paste/
deploy/loadwsgi.py", line 248, in loadcontext
[Wed Jul 07 18:02:31 2010] [error] [client 192.168.0.4]
global_conf=global_conf)
[Wed Jul 07 18:02:31 2010] [error] [client 192.168.0.4]   File "/usr/
local/lib/python2.6/dist-packages/PasteDeploy-1.3.3-py2.6.egg/paste/
deploy/loadwsgi.py", line 278, in _loadconfig
[Wed Jul 07 18:02:31 2010] [error] [client 192.168.0.4]     return
loader.get_context(object_type, name, global_conf)
[Wed Jul 07 18:02:31 2010] [error] [client 192.168.0.4]   File "/usr/
local/lib/python2.6/dist-packages/PasteDeploy-1.3.3-py2.6.egg/paste/
deploy/loadwsgi.py", line 409, in get_context
[Wed Jul 07 18:02:31 2010] [error] [client 192.168.0.4]     section)
[Wed Jul 07 18:02:31 2010] [error] [client 192.168.0.4]   File "/usr/
local/lib/python2.6/dist-packages/PasteDeploy-1.3.3-py2.6.egg/paste/
deploy/loadwsgi.py", line 431, in _context_from_use
[Wed Jul 07 18:02:31 2010] [error] [client 192.168.0.4]
object_type, name=use, global_conf=global_conf)
[Wed Jul 07 18:02:31 2010] [error] [client 192.168.0.4]   File "/usr/
local/lib/python2.6/dist-packages/PasteDeploy-1.3.3-py2.6.egg/paste/
deploy/loadwsgi.py", line 361, in get_context
[Wed Jul 07 18:02:31 2010] [error] [client 192.168.0.4]
global_conf=global_conf)
[Wed Jul 07 18:02:31 2010] [error] [client 192.168.0.4]   File "/usr/
local/lib/python2.6/dist-packages/PasteDeploy-1.3.3-py2.6.egg/paste/
deploy/loadwsgi.py", line 248, in loadcontext
[Wed Jul 07 18:02:31 2010] [error] [client 192.168.0.4]
global_conf=global_conf)
[Wed Jul 07 18:02:31 2010] [error] [client 192.168.0.4]   File "/usr/
local/lib/python2.6/dist-packages/PasteDeploy-1.3.3-py2.6.egg/paste/
deploy/loadwsgi.py", line 285, in _loadegg
[Wed Jul 07 18:02:31 2010] [error] [client 192.168.0.4]     return
loader.get_context(object_type, name, global_conf)
[Wed Jul 07 18:02:31 2010] [error] [client 192.168.0.4]   File "/usr/
local/lib/python2.6/dist-packages/PasteDeploy-1.3.3-py2.6.egg/paste/
deploy/loadwsgi.py", line 561, in get_context
[Wed Jul 07 18:02:31 2010] [error] [client 192.168.0.4]
object_type, name=name)
[Wed Jul 07 18:02:31 2010] [error] [client 192.168.0.4]   File "/usr/
local/lib/python2.6/dist-packages/PasteDeploy-1.3.3-py2.6.egg/paste/
deploy/loadwsgi.py", line 587, in find_egg_entry_point
[Wed Jul 07 18:02:31 2010] [error] [client 192.168.0.4]
possible.append((entry.load(), protocol, entry.name))
[Wed Jul 07 18:02:31 2010] [error] [client 192.168.0.4]   File "/usr/
lib/python2.6/dist-packages/pkg_resources.py", line 1913, in load
[Wed Jul 07 18:02:31 2010] [error] [client 192.168.0.4]     entry =
__import__(self.module_name, globals(),globals(), ['__name__'])
[Wed Jul 07 18:02:31 2010] [error] [client 192.168.0.4]   File "/home/
user/src/qubic_integration/tg2/qubic.medias/qubic.medias/qubic/medias/
config/middleware.py", line 4, in <module>
[Wed Jul 07 18:02:31 2010] [error] [client 192.168.0.4]     from
qubic.medias.config.app_cfg import base_config
[Wed Jul 07 18:02:31 2010] [error] [client 192.168.0.4]   File "/home/
user/src/qubic_integration/tg2/qubic.medias/qubic.medias/qubic/medias/
config/app_cfg.py", line 19, in <module>
[Wed Jul 07 18:02:31 2010] [error] [client 192.168.0.4]     from
qubic.medias import model
[Wed Jul 07 18:02:31 2010] [error] [client 192.168.0.4]   File "/home/
user/src/qubic_integration/tg2/qubic.medias/qubic.medias/qubic/medias/
model/__init__.py", line 47, in <module>
[Wed Jul 07 18:02:31 2010] [error] [client 192.168.0.4]
elixir.setup_all()
[Wed Jul 07 18:02:31 2010] [error] [client 192.168.0.4]   File "build/
bdist.linux-i686/egg/elixir/__init__.py", line 94, in setup_all
[Wed Jul 07 18:02:31 2010] [error] [client 192.168.0.4]
setup_entities(entities)
[Wed Jul 07 18:02:31 2010] [error] [client 192.168.0.4]   File "build/
bdist.linux-i686/egg/elixir/entity.py", line 951, in setup_entities
[Wed Jul 07 18:02:31 2010] [error] [client 192.168.0.4]     method()
[Wed Jul 07 18:02:31 2010] [error] [client 192.168.0.4]   File "build/
bdist.linux-i686/egg/elixir/entity.py", line 307, in setup_table
[Wed Jul 07 18:02:31 2010] [error] [client 192.168.0.4]     *args,
**kwargs)
[Wed Jul 07 18:02:31 2010] [error] [client 192.168.0.4]   File "/usr/
local/lib/python2.6/dist-packages/SQLAlchemy-0.6.1-py2.6.egg/
sqlalchemy/schema.py", line 197, in __new__
[Wed Jul 07 18:02:31 2010] [error] [client 192.168.0.4]     "columns
on an existing Table object." % key)
[Wed Jul 07 18:02:31 2010] [error] [client 192.168.0.4]
InvalidRequestError: Table 'permission' is already defined for this
MetaData instance.  Specify 'useexisting=True' to redefine options and
columns on an existing Table object.

-- 
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.

Reply via email to