Mailing List Archive

Runtime error on Windows and Trac 0.7
The following error is sent to the browser when attempting to access
trac.cgi on my 0.7 trac installation:

Where is the TRAC_ENV supposed to be set and what value should it hold?

-------------------------------------------------------


Oops...

Trac detected an internal error:

Missing environment variable "TRAC_ENV". Trac requires this variable to
point to a valid Trac Environment.
Traceback (most recent call last):
File "C:\BigApache\python\Lib\site-packages\trac\core.py", line 445,
in cgi_start
real_cgi_start()
File "C:\BigApache\python\Lib\site-packages\trac\core.py", line 396,
in real_cgi_start
env = open_environment()
File "C:\BigApache\python\Lib\site-packages\trac\core.py", line 164,
in open_environment
raise EnvironmentError, \
EnvironmentError: Missing environment variable "TRAC_ENV". Trac requires
this variable to point to a valid Trac Environment.
Runtime error on Windows and Trac 0.7 [ In reply to ]
Ok, I had to add the following line in the httpd.conf file.

SetEnv TRAC_ENV "C:/svn/trac.db"

inside the <location "/cgi-bin/trac.cgi"> block.

This could be added to the windows install guide where this block is
specified but I will not add it myself as I do not know if it should
replace the TRAC_DB environment variable or replace it.

Claude Montpetit [nertec] wrote:
>
> The following error is sent to the browser when attempting to access
> trac.cgi on my 0.7 trac installation:
>
> Where is the TRAC_ENV supposed to be set and what value should it hold?
>
> -------------------------------------------------------
>
>
> Oops...
>
> Trac detected an internal error:
>
> Missing environment variable "TRAC_ENV". Trac requires this variable to
> point to a valid Trac Environment.
> Traceback (most recent call last):
> File "C:\BigApache\python\Lib\site-packages\trac\core.py", line 445,
> in cgi_start
> real_cgi_start()
> File "C:\BigApache\python\Lib\site-packages\trac\core.py", line 396,
> in real_cgi_start
> env = open_environment()
> File "C:\BigApache\python\Lib\site-packages\trac\core.py", line 164,
> in open_environment
> raise EnvironmentError, \
> EnvironmentError: Missing environment variable "TRAC_ENV". Trac requires
> this variable to point to a valid Trac Environment.
> _______________________________________________
> Trac mailing list
> Trac@lists.edgewall.com
> http://lists.edgewall.com/mailman/listinfo/trac
>
Runtime error on Windows and Trac 0.7 [ In reply to ]
TRAC_ENV is in httpd.conf - look at the new generic install directions

Cheers,

:D

--------------------------------------------------------------------
Daragh Fitzpatrick Daragh@UChicago.edu (773) 702-8976

Solutions Architect NSIT Administrative Systems
Renewal Projects and Architecture University of Chicago
--------------------------------------------------------------------
-----Original Message-----
From: trac-bounces@bobcat.edgewall.com
[mailto:trac-bounces@bobcat.edgewall.com] On Behalf Of Claude Montpetit
[nertec]
Sent: Wednesday, May 19, 2004 9:35 AM
To: 'Trac Mailing List'
Subject: [Trac] Runtime error on Windows and Trac 0.7


The following error is sent to the browser when attempting to access
trac.cgi on my 0.7 trac installation:

Where is the TRAC_ENV supposed to be set and what value should it hold?

-------------------------------------------------------


Oops...

Trac detected an internal error:

Missing environment variable "TRAC_ENV". Trac requires this variable to
point to a valid Trac Environment.
Traceback (most recent call last):
File "C:\BigApache\python\Lib\site-packages\trac\core.py", line 445, in
cgi_start
real_cgi_start()
File "C:\BigApache\python\Lib\site-packages\trac\core.py", line 396, in
real_cgi_start
env = open_environment()
File "C:\BigApache\python\Lib\site-packages\trac\core.py", line 164, in
open_environment
raise EnvironmentError, \
EnvironmentError: Missing environment variable "TRAC_ENV". Trac requires
this variable to point to a valid Trac Environment.
_______________________________________________
Trac mailing list
Trac@lists.edgewall.com
http://lists.edgewall.com/mailman/listinfo/trac
Runtime error on Windows and Trac 0.7 [ In reply to ]
On Wed, May 19, 2004 at 11:07:01AM -0400, Claude Montpetit [nertec] wrote:
>
> Ok, I had to add the following line in the httpd.conf file.
>
> SetEnv TRAC_ENV "C:/svn/trac.db"
>
> inside the <location "/cgi-bin/trac.cgi"> block.
>
> This could be added to the windows install guide where this block is
> specified but I will not add it myself as I do not know if it should
> replace the TRAC_DB environment variable or replace it.

If you're upgrading to 0.7, you need to convert the db to an env
first, which is documented here:

<http://projects.edgewall.com/trac/file/tags/trac-0.7/UPGRADE>

(i.e., the UPGRADE file in the trac distribution).

--
=Nicholas Riley <njriley@uiuc.edu> | <http://www.uiuc.edu/ph/www/njriley>