On Wednesday, April 12, 2017 at 3:40:28 PM UTC-7, Matthew Lavigne wrote:
>
> Ryan, 
>
> Thought that I followed directions but now I get an error 500 when trying 
> to get to trac.  snip>
>
> [Wed Apr 12 17:40:54.174752 2017] [core:notice] [pid 10589] AH00094: 
> Command line: '/usr/sbin/httpd -D FOREGROUND'
> [Wed Apr 12 17:40:59.252358 2017] [:error] [pid 10595] [client IP:33017] 
> mod_wsgi (pid=10595): Exception occurred processing WSGI script 
> '/var/www/trac/trac.wsgi'.
> [Wed Apr 12 17:40:59.252407 2017] [:error] [pid 10595] [client IP:33017] 
> Traceback (most recent call last):
> [Wed Apr 12 17:40:59.252449 2017] [:error] [pid 10595] [client IP:33017]   
> File "/var/www/trac/trac.wsgi", line 30, in application
> [Wed Apr 12 17:40:59.252528 2017] [:error] [pid 10595] [client 
> IP:33017]     from trac.web.main import dispatch_request
> [Wed Apr 12 17:40:59.252552 2017] [:error] [pid 10595] [client IP:33017] 
> ImportError: No module named trac.web.main
>
> When I upgraded to 1.2.1 from 1.0.x the issue at this point was that the 
> egg file only had 400 on it in /usr/lib/python2.7/site-packages/.  Changing 
> that to 644 was sufficient to get things to work.
>
> the commands that I followed:
>
> pip install svn+https://svn.edgewall.org/repos/trac/branches/1.2-stable
>
> that appeared to pull, build and install but there was no .egg created in 
> /usr/lib/python2.7/site-packages though there was a trac directory and a 
> tracopt.  So I did a download using pip
>

If you open a python shell and run "import trac", do you get the same error?

The presence of "trac" and "tracopt" is an aspect I've seen, but don't 
understand. Do those directories, and all subdirectories, have the 755 
permission?

The wheel format is a replacement for egg, and eliminates the need for an 
egg cache. You could try installing as a wheel.

I'd remove all installed instances of Trac by repeating the following 
command until is says "not installed":
$ pip uninstall trac

Then:
$ pip install -U pip setuptools wheel
... unless you want to use the versions of those tools provided by your 
package manager. I always upgrade them to the latest.

Next,
$pip wheel --no-deps --wheel-dir wheels 
svn+https://svn.edgewall.org/repos/trac/branches/1.2-stable
$wheel install wheels/Trac-1.2.2.dev0-py2-none-any.whl 

We are in the process of updating the TracInstall documentation for wheels, 
but there are some caveats, not applicable here, which need to be dealt 
with.
 

> pip download svn+https://svn.edgewall.org/repos/trac/branches/1.2-stable  
>
> That got me a zip, I unzipped and did an install as if I was doing it from 
> source.  I update the permissions to 644 and I still get the same results.
>
> Contents of the trac.wsgi:
> import os
>
> def application(environ, start_request):
>     if not 'trac.env_parent_dir' in environ:
>         environ.setdefault('trac.env_path', '/var/www/trac/tickets')
>     if 'PYTHON_EGG_CACHE' in environ:
>         os.environ['PYTHON_EGG_CACHE'] = environ['PYTHON_EGG_CACHE']
>     elif 'trac.env_path' in environ:
>         os.environ['PYTHON_EGG_CACHE'] = \
>             os.path.join(environ['trac.env_path'], '.egg-cache')
>     elif 'trac.env_parent_dir' in environ:
>         os.environ['PYTHON_EGG_CACHE'] = \
>             os.path.join(environ['trac.env_parent_dir'], '.egg-cache')
>     from trac.web.main import dispatch_request
>     return dispatch_request(environ, start_request)
>
> Contents of the .egg-cache (/var/www/trac/tickets) is 
> [root@ithelp .egg-cache]# ls -lhtr
> total 0
> drwxr-xr-x 3 apache apache 25 Jan 10  2011 
> TracTicketDelete-2.0.1-py2.4.egg-tmp
> drwxr-xr-x 3 apache apache 25 Jan 10  2011 
> TracTicketChange-0.0.4-py2.4.egg-tmp
> drwxr-xr-x 4 apache apache 31 Nov  5  2014 Trac-1.0.2-py2.7.egg-tmp
> drwxr-xr-x 5 apache apache 46 Apr 12 17:29 Trac-1.2.2.dev0-py2.7.egg-tmp
>
>
> Any thoughts?  This is my production box and I would like to either be 
> able to roll it back or get 1.22dev working. If I drop 1.2.1 in, or if I 
> roll my backup back in, I get exactly the same error which to me says that 
> I am missing something very simple. 
>
> Matthew
>

-- 
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 https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to