I have configured Trac on my machine to work with SVN using mod_wsgi 
following the explanation from the pages:

   -  
modwsgi_IntegrationWithTrac<http://code.google.com/p/modwsgi/wiki/IntegrationWithTrac>
   - TracModWSGI <http://trac.edgewall.org/wiki/TracModWSGI>

I have multiple projects  and from time to time (Every hour each day!) I'm 
receiving the following error:
BROWSER : *RuntimeError: instance.__dict__ not accessible in restricted mode
*
LOG: *Exception AttributeError: "'SubversionRepository' object has no 
attribute 'pool'"*
For both errors I followed what was the recommended workaround:

   - RuntimeError ticket#3371 <http://trac.edgewall.org/ticket/3371>
   - AttributeError ticket#9221 <http://trac.edgewall.org/ticket/9221>

I added the *WSGIApplicationGroup %{GLOBAL}* to my directory, but it did 
not help. I'm still getting the error. The only thing that works is restart 
Apache but this implies keep an eye on the page all the time.
My configuration is :

   - Apache 2.2
   - mod_wsgi 3.3
   - Microsoft windows

I understood by this 
explanation<https://groups.google.com/forum/#!searchin/trac-users/mod_wsgi$20$2B$20multiple$20projects$20/trac-users/W277k3WD6Zw/qV-LGooXHQEJ>about
 mod_wsgi and multiple projects that Windows cannot fork processes as 
Unix does. If daemon mode is not supported in windows *which alternative do 
we have those who we need it?.* I tried enabling mpm winnt but it did not 
do the trick.
 
My conf. file is the following:
http://myenvironment/trac this one contains all the projects and it shows 
the list of available projects.
http://projectone.com virtual host that points to specific project
http://projecttwo.com virtual host that points to specific project
and so on.
 
When the *RuntimeError: instance.__dict__ not accessible in restricted 
mode*error appears it affects the one 
http://myenvironment/trac/projectone but no http://projectone. *Could be 
that something is missing in my configuration?*
 
CONF File:
<VirtualHost *:80>

ServerName myenvironment
WSGIScriptAlias /trac "C:/apache/wsgi/trac.wsgi"
 <Directory "M:\Trac\Projects">
  WSGIApplicationGroup %{GLOBAL}
  Order deny,allow
  allow from All
 </Directory>

</VirtualHost>
 
<VirtualHost *:80>

 ServerName projectone
 Alias /trac/chrome/common M:/Trac/Projects/Projectone/htdocs
 <Directory "M:/Trac/Projects/htdocs">
   Order allow,deny
   Allow from all
 </Directory>
  
 WSGIScriptAlias / "C:/apache/wsgi/trac-projectone.wsgi"
 <Directory "M:\Trac\Projects\Projectone">
  WSGIApplicationGroup %{GLOBAL}
  Options FollowSymLinks Indexes
  Order deny,allow
  allow from All
 </Directory>
  
 <Location />
  #Here goes my authentication parameters
 </location>

</VirtualHost>
 
My wsgi files are:

   - For the entire environment (trac.wsgi):

#!C:\Python27\python.exe
import sys
sys.stdout = sys.stderr
import os

os.environ['TRAC_ENV_PARENT_DIR'] = 'M:/Trac/Projects'
os.environ['PYTHON_EGG_CACHE'] = 'M:/Trac/Projects/.egg-cache'
# Load Trac
import trac.web.main
application = trac.web.main.dispatch_request

 

   - For the project (trac-projectone.wsgi). This configuration was 
   duplicated for the other projects modifying the place of the eggs :

 
 #!C:\Python27\python.exe
import sys
sys.stdout = sys.stderr
import os
os.environ['PYTHON_EGG_CACHE'] = 'M:/Trac/Projects/Projectone/.egg-cache'
  
# Load Trac
import trac.web.main
def application(environ, start_response):
  environ['trac.env_path'] = 'M:/Trac/Projects/projectone' 
  return trac.web.main.dispatch_request(environ, start_response)

I would like to hear your suggestions.
 
~Cay

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to