Modify

Opened 12 years ago

Closed 9 years ago

#9552 closed defect (wontfix)

TypeError: 'NoneType' object is not subscriptable

Reported by: zbuhman@… Owned by: Herbert Valerio Riedel
Priority: normal Component: GitPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.12

Description (last modified by Ryan J Ollos)

How to Reproduce While doing a GET operation on /timeline, Trac issued an internal error. please provide additional details here Request parameters:

User agent: Mozilla/5.0 X11; Linux x86_64; rv:8.0 Gecko/20100101 Firefox/8.0 System Information

Trac 0.12.2
Babel 0.9.6 translations unavailable
Docutils 0.8.1
Genshi 0.6
GIT 1.7.7.1
Pygments 1.4
pysqlite 2.6.0
Python 2.7.2 default, Aug 16 2011, 07:03:08 br GCC 4.6.1
pytz 2011h
setuptools 0.6
SQLite 3.7.7
Subversion 1.6.17 r1128011
jQuery 1.4.2

Enabled Plugins

tracext.git.git-fs N/A
TracMasterTickets 3.0.2

Python Traceback

Traceback  most recent call last : 
File  /usr/lib/python2.7/dist-packages/trac/web/main.py , line 511, in _dispatch_request  dispatcher.dispatch req
File  /usr/lib/python2.7/dist-packages/trac/web/main.py , line 237, in dispatch  resp   chosen_handler.process_request req
File  /usr/lib/python2.7/dist-packages/trac/timeline/web_ui.py , line 142, in process_request  available_filters   event_provider.get_timeline_filters req  or
File  /usr/lib/python2.7/dist-packages/trac/versioncontrol/web_ui/changeset.py , line 861, in get_timeline_filters  repositories   rm.get_real_repositories
File  /usr/lib/python2.7/dist-packages/trac/versioncontrol/api.py , line 588, in get_real_repositories  repos   self.get_repository repoNAME
File  /usr/lib/python2.7/dist-packages/trac/versioncontrol/api.py , line 526, in get_repository  repos   connector.get_repository rtype, rdir, repoinfo.copy
File  /usr/lib/python2.7/dist-packages/tracext/git/git_fs.py , line 162, in get_repository 
File  /usr/lib/python2.7/dist-packages/tracext/git/git_fs.py , line 180, in __init__
File  /usr/lib/python2.7/dist-packages/trac/versioncontrol/api.py , line 732, in __init__  self.repoNAME   params  NAME   TypeError:  NoneType  object is not subscriptable

Attachments (0)

Change History (17)

comment:1 Changed 12 years ago by zbuhman@…

Sorry, my WikiFormatting got eaten.

I originally submitted this at http://trac.edgewall.org/ticket/10474 which is formatted properly.

comment:2 Changed 12 years ago by anonymous

Which version of trac-git-plugin did you use?

comment:3 Changed 12 years ago by anonymous

easy_install http://github.com/hvr/trac-git-plugin/tarball/master as described on GitPlugin.

comment:4 Changed 12 years ago by adamculp@…

I have the same issue. Installed trac and git-trac from Ubuntu repos. Set up trac.ini file as follows:

repository_dir = /path/to/repos/.git
repository_type = git
tracrpc.* = enabled
tracext.git.* = enabled
cached_repository = false
persistent_cache = false
shortrev_len = 6
wiki_shortrev_len = 7
git_bin = /usr/bin/git
git_fs_encoding = utf-8
trac_user_rlookup = false
use_committer_id = true
use_committer_time = false

comment:5 Changed 12 years ago by anonymous

I have also the same issue when using trac-git with Ubuntu Oneiric.

comment:6 Changed 12 years ago by Ryan J Ollos

Description: modified (diff)

comment:7 Changed 12 years ago by lorinh@…

It looks like the trac-git package that ships with Ubuntu Oneiric is broken, removing it and installing using easy_install from github fixed the problem for me.

comment:8 Changed 12 years ago by anonymous

I had the same problem in Ubuntu Natty, then removed and installed at github and the problem has changed, now the problem is:

2012-09-24 15:20:26,040 Trac[main] DEBUG: Dispatching <RequestWithSession "GET '/browser'">
2012-09-24 15:20:26,043 Trac[session] DEBUG: Retrieving session for ID '16c4761e459949b54c35cfe0'
2012-09-24 15:20:26,045 Trac[main] DEBUG: Negotiated locale: None -> en_US
2012-09-24 15:20:26,053 Trac[chrome] DEBUG: Prepare chrome data for request
2012-09-24 15:20:26,055 Trac[PyGIT] DEBUG: requested PyGIT.Storage instance 140114303361552 for '/opt/git/pyECF.git'
2012-09-24 15:20:26,055 Trac[git_fs] DEBUG: disabled CachedRepository for '/opt/git/pyECF.git'
2012-09-24 15:20:26,056 Trac[perm] DEBUG: No policy allowed anonymous performing ACCTMGR_CONFIG_ADMIN on None
2012-09-24 15:20:26,056 Trac[perm] DEBUG: No policy allowed anonymous performing ACCTMGR_USER_ADMIN on None
2012-09-24 15:20:26,056 Trac[perm] DEBUG: No policy allowed anonymous performing TRAC_ADMIN on None
2012-09-24 15:20:26,056 Trac[perm] DEBUG: No policy allowed anonymous performing PERMISSION_GRANT on None
2012-09-24 15:20:26,056 Trac[perm] DEBUG: No policy allowed anonymous performing PERMISSION_REVOKE on None
2012-09-24 15:20:26,057 Trac[perm] DEBUG: No policy allowed anonymous performing TICKET_ADMIN on None
2012-09-24 15:20:26,057 Trac[perm] DEBUG: No policy allowed anonymous performing VERSIONCONTROL_ADMIN on None
2012-09-24 15:20:26,058 Trac[perm] DEBUG: No policy allowed anonymous performing TICKET_CREATE on None
2012-09-24 15:20:26,059 Trac[main] WARNING: [127.0.0.1] HTTPNotFound: 404 Trac Error (No node /)
2012-09-24 15:20:26,084 Trac[perm] DEBUG: No policy allowed anonymous performing EMAIL_VIEW on None

Note: I'm using Trac1.0. I migrated from version 0.12 to 1.0 today.

comment:9 in reply to:  8 ; Changed 12 years ago by Ryan J Ollos

Replying to anonymous:

I'm using Trac1.0. I migrated from version 0.12 to 1.0 today.

Trac 1.0 provides Git support in tracopt: t:TracGit.

comment:10 in reply to:  9 ; Changed 12 years ago by Ivanelson Nunes

Replying to rjollos:

Replying to anonymous:

I'm using Trac1.0. I migrated from version 0.12 to 1.0 today.

Trac 1.0 provides Git support in tracopt: t:TracGit.

I'm very sorry! The problem was actually just the name of the repository that pyECF typed instead pyecf.

[repositories]
.alias = pyecf
pyecf.description = This is the ''main'' project pyECF.
pyecf.dir = /opt/git/pyECF.git
pyecf.hidden = true
pyecf.type = git

Now I am a happy user Trac today that migrated from version 0.12 to 1.0.

comment:11 in reply to:  10 ; Changed 12 years ago by Ryan J Ollos

Replying to ivanelson:

I'm very sorry! The problem was actually just the name of the repository that pyECF typed instead pyecf.

So you are using the optional component that is distributed with Trac, rather than this plugin?

p.s. I cleaned up the formatting in your comments. You may want to give t:WikiFormatting a quick read ;)

comment:12 in reply to:  11 Changed 12 years ago by Ivanelson Nunes

Replying to rjollos:

Replying to ivanelson:

I'm very sorry! The problem was actually just the name of the repository that pyECF typed instead pyecf.

So you are using the optional component that is distributed with Trac, rather than this plugin?

p.s. I cleaned up the formatting in your comments. You may want to give t:WikiFormatting a quick read ;)

I installed the plugin for trac-git Github. The trac-git on Ubuntu Natty is broken.

easy_install http://github.com/hvr/trac-git-plugin/tarball/master

Also enabled in my trac.ini:

tracopt.versioncontrol.git.* = enabled

comment:13 Changed 12 years ago by Ryan J Ollos

What I was trying to describe to you earlier is that t:TracGit is part of the Trac project starting with Trac 1.0. Rather than installing that egg, you can just enable the plugin via the webadmin panel, or editing trac.ini. The reason I suggest this is that the version in the Trac core was brought in from http://github.com/hvr/trac-git-plugin/tarball/master, and you'll find that there have been bugfixes and will be better support going forward (see t:TracGit#History).

Anway, if you are interested in going that route, you should read the t:TracGit page.

comment:14 in reply to:  13 Changed 12 years ago by Ivanelson Nunes

Replying to rjollos:

What I was trying to describe to you earlier is that t:TracGit is part of the Trac project starting with Trac 1.0. Rather than installing that egg, you can just enable the plugin via the webadmin panel, or editing trac.ini. The reason I suggest this is that the version in the Trac core was brought in from http://github.com/hvr/trac-git-plugin/tarball/master, and you'll find that there have been bugfixes and will be better support going forward (see t:TracGit#History).

Anway, if you are interested in going that route, you should read the t:TracGit page.

I understand! In reality when I installed trac-git I was still using version 0.12.

In Trac1.0, so it is recommended to remove the "eggs" to trac-git?

And then let enabled native support:

tracopt.versioncontrol.git.* = enabled

comment:15 Changed 12 years ago by Ryan J Ollos

Yeah, you should remove the egg, enable as you describe and then configure per the instructions at t:TracGit.

comment:16 in reply to:  15 Changed 12 years ago by Ivanelson Nunes

Replying to rjollos:

Yeah, you should remove the egg, enable as you describe and then configure per the instructions at t:TracGit.

Thank you very much.

comment:17 Changed 9 years ago by Ryan J Ollos

Resolution: wontfix
Status: newclosed

GitPlugin is deprecated. Please upgrade to Trac 1.0 and use TracGit.

Modify Ticket

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

Add Comment


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

 
Note: See TracTickets for help on using tickets.