Ticket #7920 (closed defect: fixed)

Opened 3 years ago

Last modified 8 months ago

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

Reported by: jliu Assigned to: penmark
Priority: normal Component: ContextMenuPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.12

Description

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
tracwysiwyg 0.12.0.2

Python Traceback

Traceback (most recent call last):
  File "build\bdist.win32\egg\trac\web\main.py", line 513, in _dispatch_request
    dispatcher.dispatch(req)
  File "build\bdist.win32\egg\trac\web\main.py", line 256, in dispatch
    content_type)
  File "build\bdist.win32\egg\trac\web\chrome.py", 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\core.py", line 132, in __or__
    return Stream(_ensure(function(self)), serializer=self.serializer)
  File "build\bdist.win32\egg\trac\web\chrome.py", line 955, in inner
    data)
  File "build\bdist.win32\egg\contextmenu\contextmenu.py", line 155, in filter_stream
    content = SubversionLink(self.env).get_content(req, data['path'], stream, data)
  File "build\bdist.win32\egg\contextmenu\contextmenu.py", line 90, in get_content
    href = self.svn_base_url.rstrip('/')
AttributeError: 'NoneType' object has no attribute 'rstrip'

Attachments

Change History

08/18/11 20:57:17 changed by PavloT

There is must be such setup in your trac.ini

[svn]
repository_url=file:///home/trac/dev/svnrepo

Change url to point to your repo.

07/31/12 23:02:28 changed by rjollos

#8369 closed as a duplicate.

08/01/12 03:25:36 changed by rjollos

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

08/01/12 03:27:13 changed by rjollos

  • status changed from assigned to closed.
  • resolution set to fixed.

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

10/07/12 20:05:13 changed by rjollos

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


Add/Change #7920 (AttributeError: 'NoneType' object has no attribute 'rstrip')




Change Properties
Action