Opened 8 years ago

Closed 8 years ago

#4681 closed defect (worksforme)

NameError: global name 'GitErrorCommit_Id' is not defined when trying to open the browser

Reported by: vedant@… Owned by: hvr
Priority: highest Component: GitPlugin
Severity: blocker Keywords:
Cc: vedant@… Trac Release: 0.11


I initialised a new trac environment and set it up for a Git repository. When I tried to view the browser, I got the following error:

Trac detected an internal error: NameError: global name 'GitErrorCommit_Id' is not defined

The action that triggered the error was: GET: /browser

This is the error from stderr: 09:22:54 IST Trac[main] ERROR: global name 'GitErrorCommit_Id' is not defined Traceback (most recent call last):

File "/usr/lib/python2.5/site-packages/trac/web/", line 423, in _dispatch_request


File "/usr/lib/python2.5/site-packages/trac/web/", line 197, in dispatch

resp = chosen_handler.process_request(req)

File "/usr/lib/python2.5/site-packages/trac/versioncontrol/web_ui/", line 361, in process_request

'dir': node.isdir and self._render_dir(req, repos, node, rev),

File "/usr/lib/python2.5/site-packages/trac/versioncontrol/web_ui/", line 408, in _render_dir

changes = get_changes(repos, [i.rev for i in entries])

File "/usr/lib/python2.5/site-packages/trac/versioncontrol/web_ui/", line 38, in get_changes

changeset = repos.get_changeset(rev)

File "/usr/lib/python2.5/site-packages/tracext/git/", line 223, in get_changeset

return GitChangeset(self.git, rev)

File "/usr/lib/python2.5/site-packages/tracext/git/", line 389, in init

(msg, props) = git.read_commit(sha)

File "/usr/lib/python2.5/site-packages/tracext/git/", line 486, in read_commit

raise GitErrorCommit_Id

NameError: global name 'GitErrorCommit_Id' is not defined

I am running debian testing, with trac, git and trac-git installed through apt.

Attachments (0)

Change History (4)

comment:1 Changed 8 years ago by thatch

Was the git repo empty?

comment:2 Changed 8 years ago by vedant@…

It wasn't empty, but it had just one commit. The browser seems to work fine with a repo with many files and commits.

comment:3 Changed 8 years ago by bugs@…

I ran into the same bug. I resolved it by renaming files which have a space in the name like: "revision3 2009.txt" to "revision3_2009.txt".

This works for me.


comment:4 Changed 8 years ago by hvr

  • Resolution set to worksforme
  • Status changed from new to closed

should have been fixed with r5378

Add Comment

Modify Ticket

as closed The owner will remain hvr.
The resolution will be deleted. Next status will be 'reopened'.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.