Edgewall Software
Modify

Opened 19 years ago

Closed 19 years ago

#1645 closed defect (invalid)

Cannot setup trac env, missing global name 'util'

Reported by: tbarstow@… Owned by: Christopher Lenz
Priority: normal Milestone:
Component: admin/console Version: 0.8.2
Severity: major Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

After completing trac install (0.8.2 or 0.8-current, tried both), I try to setup an environment with:

sudo trac-admin /trac/master initenv

This errs with the following:

… (can provide output if you want it, looks uninteresting) … /Library/Frameworks/Python.framework/Versions/2.4/share/trac/wiki-default/WikiStart ⇒ WikiStart
Indexing repository
Failed to initialize database. global name 'util' is not defined

I have received this error with 0.8-current and with 0.8.2. I am using subversion 1.2, python 2.4.

Any help greatly appreciated, thanks

Attachments (1)

1645.diff (638 bytes ) - added by Christopher Lenz 19 years ago.
Please apply this and rerun trac-admin

Download all attachments as: .zip

Change History (7)

comment:1 by Christopher Lenz, 19 years ago

Version: none0.8.2

Not sure what's happening here. Can you please try applying the patch I'll attach in a second?

by Christopher Lenz, 19 years ago

Attachment: 1645.diff added

Please apply this and rerun trac-admin

comment:2 by Christopher Lenz, 19 years ago

Owner: changed from daniel to Christopher Lenz

comment:3 by tbarstow@…, 19 years ago

After applying patch:

% sudo trac-admin /trac/master initenv

… (configuration)

/trac/master Repository access error: ("Can't open file '/trac/master/format': No such file or directory", 2)

I get this error whether I create the /trac/master directory before running trac-admin or not. /trac directory always exists.

Thanks

comment:4 by tbarstow, 19 years ago

I should note that the initenv process got further along before applying the patch (it used to have a lot of "Indexing repository" lines before failing, but now it fails immediately after configuration, with the error above)

comment:5 by tbarstow, 19 years ago

I fixed a localization problem that I didn't notice, and now trac-admin behaves more similarly to before. Here is the new output, probably more what you were expecting:

% sudo trac-admin /trac/master initenv

… (config)

/Library/Frameworks/Python.framework/Versions/2.4/share/trac/wiki-default/WikiStart ⇒ WikiStart
Indexing repository
Failed to initialize database. global name 'util' is not defined
Traceback (most recent call last):

File "/opt/local/bin/trac-admin", line 524, in do_initenv

sync.sync(cnx, rep, fs_ptr, pool)

File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/trac/sync.py", line 30, in sync

if util.SVN_VER_MAJOR < 1:

NameError: global name 'util' is not defined

comment:6 by tbarstow, 19 years ago

Resolution: invalid
Status: newclosed

The localization problem ended up leading me to the answer. One thing I noticed that is annoying is that "python ./setup.py install" does not overwrite any files, so I had to manually delete the installed files myself to actually make a difference when reinstalling.

In any case, thanks for trac, and thanks for your help, cmlenz.

I am taking the liberty of resolving this ticket.

I should note however that I did apply patches from other related bugs, so folks with a similar problem may want to start there.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christopher Lenz.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christopher Lenz 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.