Opened 21 years ago
Closed 21 years ago
#384 closed defect (fixed)
trac-admin initenv doesn't work with 0.7-rc1 (for me)
Reported by: | Owned by: | Jonas Borgström | |
---|---|---|---|
Priority: | highest | Milestone: | 0.7 |
Component: | admin/console | Version: | devel |
Severity: | blocker | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
I get a rather unhelpful error when I set up a new trac install when I've already created a directory for the trac data. Perhaps trap this and make it more explicit? I solved the problem by deleting the directory /home/keir/tmp/trac-install, but it took me several minutes to notice that the real error was way up top.
$ trac-admin /home/keir/tmp/trac-install initenv Creating a new Trac environment at /home/keir/tmp/trac-install Trac will first ask a few questions about your environment in order to initalize and prepare the project database. Please enter the name of your project. This name will be used in page titles and descriptions. Project Name [My Project]> Please specify the absolute path to the project Subversion repository. Repository must be local, and trac-admin requires read+write permission to initialize the Trac database. Path to repository [/var/svn/test]> /home/keir/svn/ Please enter location of Trac page templates. Default is the location of the site-wide templatesinstalled with Trac. Templates directory [/usr/local/share/trac/templates]> Creating and Initializing Project Failed to create environment. [Errno 17] File exists: '/home/keir/tmp/trac-insta ll' Failed to initialize database. 1 Traceback (most recent call last): File "/usr/local/bin/trac-admin", line 913, in ? main() File "/usr/local/bin/trac-admin", line 902, in main tracadm.docmd (command) File "/usr/local/bin/trac-admin", line 63, in docmd self.onecmd(cmd) File "/usr/lib/python2.3/cmd.py", line 210, in onecmd return func(arg) File "/usr/local/bin/trac-admin", line 491, in do_initenv if cnx: UnboundLocalError: local variable 'cnx' referenced before assignment
Attachments (0)
Change History (2)
comment:1 by , 21 years ago
Component: | general → trac-admin |
---|---|
Milestone: | → 0.7 |
Priority: | normal → highest |
Severity: | minor → blocker |
comment:2 by , 21 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Failed to create environment. [Errno 17] File exists: '/home/keir/tmp/trac-install'
Is the real problem. trac-admin refuses to create an environment if the target directory already exists. Remove the directory or use another path.
The traceback is printed because trac-admin failed to handle the exception raised by the first problem.
Fixed in [523].
trac-admin should break after the first exception.