Edgewall Software
Modify

Opened 17 years ago

Closed 17 years ago

#6061 closed defect (invalid)

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

Reported by: markus@… Owned by: Jonas Borgström
Priority: normal Milestone:
Component: general Version: devel
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

How to Reproduce

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

(please provide additional details here)

This is with bitten 0.6dev-r502. Don't know if its a bitten or a trac issue.

System Information

Trac 0.11dev-r6021
Python 2.5.1c1 (release25-maint, Apr 12 2007, 20:57:14)
[GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)]
setuptools 0.6c5
SQLite 3.3.13
pysqlite 2.3.2
Genshi 0.4.4
Pygments None
Subversion 1.4.3 (r23084)

Python Traceback

Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/Trac-0.11dev_r6021-py2.5.egg/trac/web/main.py", line 381, in dispatch_request
    dispatcher.dispatch(req)
  File "/usr/lib/python2.5/site-packages/Trac-0.11dev_r6021-py2.5.egg/trac/web/main.py", line 191, in dispatch
    resp = chosen_handler.process_request(req)
  File "/usr/lib/python2.5/site-packages/Bitten-0.6dev_r502-py2.5.egg/bitten/web_ui.py", line 128, in process_request
    self._render_overview(req)
  File "/usr/lib/python2.5/site-packages/Bitten-0.6dev_r502-py2.5.egg/bitten/web_ui.py", line 171, in _render_overview
    shorten_line(chgset.message), self.env)
  File "/usr/lib/python2.5/site-packages/Trac-0.11dev_r6021-py2.5.egg/trac/wiki/formatter.py", line 1052, in wiki_to_oneliner
    OneLinerFormatter(ctx).format(wikitext, out, shorten)
  File "/usr/lib/python2.5/site-packages/Trac-0.11dev_r6021-py2.5.egg/trac/wiki/formatter.py", line 881, in format
    result = re.sub(self.wikiparser.rules, self.replace, result)
  File "re.py", line 142, in sub
    return _compile(pattern, 0).sub(repl, string, count)
  File "/usr/lib/python2.5/site-packages/Trac-0.11dev_r6021-py2.5.egg/trac/wiki/formatter.py", line 735, in replace
    replacement = self.handle_match(fullmatch)
  File "/usr/lib/python2.5/site-packages/Trac-0.11dev_r6021-py2.5.egg/trac/wiki/formatter.py", line 728, in handle_match
    return external_handler(self, match, fullmatch)
  File "/usr/lib/python2.5/site-packages/Trac-0.11dev_r6021-py2.5.egg/trac/wiki/api.py", line 309, in wikipagename_link
    self.ignore_missing_pages)
  File "/usr/lib/python2.5/site-packages/Trac-0.11dev_r6021-py2.5.egg/trac/wiki/api.py", line 345, in _format_link
    if 'WIKI_VIEW' not in req.perm(context):
AttributeError: 'NoneType' object has no attribute 'perm'

Attachments (0)

Change History (2)

comment:1 by anonymous, 17 years ago

FYI- I get the same error.

System Information

Trac 0.11dev-r6048
Python 2.5.1 (r251:54863, Oct 3 2007, 14:29:51)
[GCC 3.4.6 20060404 (Red Hat 3.4.6-3)]
setuptools 0.6c7
SQLite 3.4.2
pysqlite 2.3.5
Genshi 0.4.4
Subversion 1.4.5 (r25188)

Python Traceback

Traceback (most recent call last):
  File "/dat/hft/lib/python2.5/site-packages/Trac-0.11dev_r6048-py2.5.egg/trac/web/main.py", line 381, in dispatch_request
    dispatcher.dispatch(req)
  File "/dat/hft/lib/python2.5/site-packages/Trac-0.11dev_r6048-py2.5.egg/trac/web/main.py", line 191, in dispatch
    resp = chosen_handler.process_request(req)
  File "/dat/hft/lib/python2.5/site-packages/Bitten-0.6dev_r510-py2.5.egg/bitten/web_ui.py", line 128, in process_request
    self._render_overview(req)
  File "/dat/hft/lib/python2.5/site-packages/Bitten-0.6dev_r510-py2.5.egg/bitten/web_ui.py", line 171, in _render_overview
    shorten_line(chgset.message), self.env)
  File "/dat/hft/lib/python2.5/site-packages/Trac-0.11dev_r6048-py2.5.egg/trac/wiki/formatter.py", line 1052, in wiki_to_oneliner
    OneLinerFormatter(ctx).format(wikitext, out, shorten)
  File "/dat/hft/lib/python2.5/site-packages/Trac-0.11dev_r6048-py2.5.egg/trac/wiki/formatter.py", line 881, in format
    result = re.sub(self.wikiparser.rules, self.replace, result)
  File "/dat/hft/lib/python2.5/re.py", line 142, in sub
    return _compile(pattern, 0).sub(repl, string, count)
  File "/dat/hft/lib/python2.5/site-packages/Trac-0.11dev_r6048-py2.5.egg/trac/wiki/formatter.py", line 735, in replace
    replacement = self.handle_match(fullmatch)
  File "/dat/hft/lib/python2.5/site-packages/Trac-0.11dev_r6048-py2.5.egg/trac/wiki/formatter.py", line 728, in handle_match
    return external_handler(self, match, fullmatch)
  File "/dat/hft/lib/python2.5/site-packages/Trac-0.11dev_r6048-py2.5.egg/trac/wiki/api.py", line 309, in wikipagename_link
    self.ignore_missing_pages)
  File "/dat/hft/lib/python2.5/site-packages/Trac-0.11dev_r6048-py2.5.egg/trac/wiki/api.py", line 345, in _format_link
    if 'WIKI_VIEW' not in req.perm(context):
AttributeError: 'NoneType' object has no attribute 'perm'

comment:2 by osimons <simon-code@…>, 17 years ago

Resolution: invalid
Status: newclosed

This is a Bitten issue - the code does not make available the required req object for checking permissions needed for current Trac 0.11dev.

Without knowing the details of this project at all, it is quite possible that this code won't get updated before the TracDev/ContextRefactoring is settled and implemented…

Closing this ticket, and please file the ticket with the Bitten project.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jonas Borgström.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Jonas Borgström to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.