Edgewall Software
Modify

Opened 16 years ago

Closed 16 years ago

Last modified 15 years ago

#7521 closed defect (worksforme)

.egg-cache shows up in projects env since upgrade from r7341 to 0.11.1

Reported by: jhammel@… Owned by:
Priority: normal Milestone:
Component: general Version: 0.11.1
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

I upgraded from r7341 to 0.11.1 and now going to the index.html page displays atop my list of projects:

.egg-cache: Error
([Errno 2] No such file or directory: '/usr/local/topp/trac/projects/.egg-cache/VERSION')

Nothing was changed in configuration. I'm using virtualenv + apache + mod_python.

apache configuration:

<VirtualHost 10.51.224.3:80>
ServerName trac.openplans.org
RewriteEngine on
RewriteCond %{REQUEST_URI} ^/robots.txt [OR]
RewriteCond %{HTTP_USER_AGENT} ^(.*)bot [NC]
RewriteRule ^/(.*) - [F]

 <Location />
  SetEnv PYTHON_EGG_CACHE /usr/local/topp/trac
  SetHandler mod_python
  #PythonPath "['/usr/local/topp/trac'] + sys.path"
  PythonPath "['/usr/local/topp/trac'] + sys.path"
  PythonInterpreter main_interpreter
  PythonHandler myvirtualtrac

  PythonOption TracEnvParentDir /usr/local/topp/trac/projects
  PythonOption TracUriRoot /
  PythonDebug On
 </Location>

CustomLog /var/log/apache2/trac.openplans.org-access_log common
</VirtualHost>

myvirtualtrac.py:

#!/usr/local/topp/trac/current/bin/python

import os
import site
os.environ['PYTHON_EGG_CACHE'] = '/tmp'
site.addsitedir('/usr/local/topp/trac/current/lib/python2.4/site-packages')

from trac.web.modpython_frontend import handler

I know I have PYTHON_EGG_CACHE set twice. This worked aroud an earlier bug, though maybe its not necessary anymore. But neither of them are obeyed (formerly, the one in the apache conf was followed, but now eggs are put in TracEnvParentDir which causes the issue

Attachments (0)

Change History (10)

comment:1 by alristico@…, 16 years ago

I'm getting the same error since I upgraded to v7478. My info:

Apache conf:

PythonOption PYTHON_EGG_CACHE /tmp
RewriteEngine on

RewriteRule ^/trac/internal$ /trac/internal/TracIndex [PT]
RewriteRule ^/trac/internal/$ /trac/internal/TracIndex [PT]
<Location /trac/internal/>
  SetHandler mod_python
  SetEnv PYTHON_EGG_CACHE /tmp
  PythonInterpreter main_interpreter
  PythonHandler trac.web.modpython_frontend
  PythonOption TracEnvParentDir /var/trac/internal_GRP
  PythonOption TracUriRoot /trac/internal/
</Location>

Trac svn info (I built by doing "python setup.py install":

Path: .
URL: http://svn.edgewall.org/repos/trac/branches/0.11-stable
Repository Root: http://svn.edgewall.org/repos/trac
Repository UUID: af82e41b-90c4-0310-8c96-b1721e28e2e2
Revision: 7480
Node Kind: directory
Schedule: normal
Last Changed Author: jonas
Last Changed Rev: 7478
Last Changed Date: 2008-08-19 12:34:48 -0700 (Tue, 19 Aug 2008)

Apache: 2.2.6 mod_python: 3.3.1 Python 2.5.1

If you need anything else from me for this bug, let me know. If you need logs, I'm an intermediate, so just tell me where they are and I'll post them.

comment:2 by harty83, 16 years ago

Same error here after upgrading to 0.11.1. I tried just creating a file called VERSION in the listed directory but I still get an error

.egg-cache: Error
()

comment:3 by harty83, 16 years ago

Okay I fixed this by doing the following

First I changed

  SetEnv PYTHON_EGG_CACHE /tmp

in my apache conf to

  PythonOption PYTHON_EGG_CACHE /tmp

Then removed the .egg-cache directory from my parent trac directory.

Finally restarted my web server.

comment:4 by anonymous, 16 years ago

This resolves the problem on my server. Thanks

in reply to:  3 comment:5 by anonymous, 16 years ago

Resolution: worksforme
Status: newclosed

Replying to harty83:

Okay I fixed this by doing the following

First I changed

  SetEnv PYTHON_EGG_CACHE /tmp

in my apache conf to

  PythonOption PYTHON_EGG_CACHE /tmp

Then removed the .egg-cache directory from my parent trac directory.

Finally restarted my web server.

This works for me too. I'm going to close the ticket.

comment:6 by Jonas Borgström, 16 years ago

Just for the record: This should be fixed by [7481].

comment:7 by anonymous, 16 years ago

Thank you this helped me fix my issue also

in reply to:  3 comment:8 by rolf, 15 years ago

Brilliant, this worked for me to.

comment:9 by johannes.kingma@…, 15 years ago

I have exactly the same problem but have no clue what you are talking about:

Debian 5.0.4 lenny Trac 0.11.1-2.1 libapache2 3.3.1-7 apache2 2.2.9-10+lenny6

could someone explain to my what I need to do where?

comment:10 by anonymous, 15 years ago

Ok, I got it. I modified the /etc/apache2/sites-available/<site-name> file section <Location /trac> and added the line

                PythonOption PYTHON_EGG_CACHE /tmp

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The ticket will remain with no owner.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from (none) to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.