Modify

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: Herbert Valerio Riedel
Priority: highest Component: GitPlugin
Severity: blocker Keywords:
Cc: vedant@… Trac Release: 0.11

Description

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/main.py", line 423, in _dispatch_request

dispatcher.dispatch(req)

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

resp = chosen_handler.process_request(req)

File "/usr/lib/python2.5/site-packages/trac/versioncontrol/web_ui/browser.py", 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/browser.py", 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/util.py", line 38, in get_changes

changeset = repos.get_changeset(rev)

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

return GitChangeset(self.git, rev)

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

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

File "/usr/lib/python2.5/site-packages/tracext/git/PyGIT.py", 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 Tim Hatch

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.

Greetz!

comment:4 Changed 8 years ago by Herbert Valerio Riedel

Resolution: worksforme
Status: newclosed

should have been fixed with r5378

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Herbert Valerio Riedel.
The resolution will be deleted.

Add Comment


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

 
Note: See TracTickets for help on using tickets.