Opened 8 years ago

Closed 6 years ago

Last modified 6 years ago

#7920 closed defect (fixed)

AttributeError: 'NoneType' object has no attribute 'rstrip'

Reported by: jliu Owned by: Pontus Enmark
Priority: normal Component: ContextMenuPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.12


Hi. I installed the ContextMenu plugin by building the egg from source. (Python 2.5.4) It installed successfully. But causes error below when I try to load up the Browse Source page. Any help would be appreciated.

How to Reproduce

While doing a GET operation on /browser, Trac issued an internal error.

(please provide additional details here)

Request parameters:

{'path': '/'}

User agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/534.7 (KHTML, like Gecko) Chrome/7.0.517.41 Safari/534.7

System Information

Trac 0.12
Genshi 0.6
mod_python 3.3.1
pysqlite 2.5.5
Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit (Intel)]
setuptools 0.6c11
SQLite 3.6.11
Subversion 1.6.6 (r40053)
jQuery 1.4.2

Enabled Plugins

contextmenuplugin 0.1
gridmodify 0.1.5
privatewikis 1.0.0
timingandestimationplugin 1.0.6
tracaccess 0.1
tracaccountmanager 0.3dev
tracburndown 1.9.2
tracpermredirect 2.0
tractags 0.7dev

Python Traceback

Traceback (most recent call last):
  File "build\bdist.win32\egg\trac\web\", line 513, in _dispatch_request
  File "build\bdist.win32\egg\trac\web\", line 256, in dispatch
  File "build\bdist.win32\egg\trac\web\", line 816, in render_template
    stream |= self._filter_stream(req, method, filename, stream, data)
  File "E:\apps\apache2\bin\lib\site-packages\genshi-0.6-py2.5.egg\genshi\", line 132, in __or__
    return Stream(_ensure(function(self)), serializer=self.serializer)
  File "build\bdist.win32\egg\trac\web\", line 955, in inner
  File "build\bdist.win32\egg\contextmenu\", line 155, in filter_stream
    content = SubversionLink(self.env).get_content(req, data['path'], stream, data)
  File "build\bdist.win32\egg\contextmenu\", line 90, in get_content
    href = self.svn_base_url.rstrip('/')
AttributeError: 'NoneType' object has no attribute 'rstrip'

Attachments (0)

Change History (5)

comment:1 Changed 7 years ago by PavloT

There is must be such setup in your trac.ini


Change url to point to your repo.

comment:2 Changed 6 years ago by Ryan J Ollos

#8369 closed as a duplicate.

comment:3 Changed 6 years ago by Ryan J Ollos

penmark: are you still maintaining this plugin? I hope it is okay if I commit a quick fix for this issue.

comment:4 Changed 6 years ago by Ryan J Ollos

Resolution: fixed
Status: assignedclosed

(In [11870]) Fixes #7920: Get full repository path so that plugin will work correctly in a multi-repository environment.

comment:5 Changed 6 years ago by Ryan J Ollos

Some refactoring of [11870] was carried out in [12116].

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Pontus Enmark.
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.