Edgewall Software
Modify

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#12934 closed defect (cantfix)

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

Reported by: joakim Owned by:
Priority: normal Milestone:
Component: attachment Version: 1.2.2
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description (last modified by Ryan J Ollos)

How to Reproduce

This happens when I have th:TracVote enabled and trying to access anything related with attachments. If I disable the th:TracVote, everything works beautifully

TracIni settings

[components]
tracvote.* = enabled

[vote]
paths = *

While doing a GET operation on /attachment/wiki/Page_Name/Image 09.jpg, Trac issued an internal error.

(please provide additional details here)

Request parameters:

{'path': u'Page/SubPage/Image 09.jpg', 'realm': u'wiki'}

User agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:56.0) Gecko/20100101 Firefox/56.0

System Information

Trac 1.2.2
Babel 2.5.1
dnspython 1.15.0
Docutils 0.12
FullBlog 0.1.6.3
Genshi 0.7 (with speedups)
httplib2 0.10.3
mod_python 3.3.1
Pillow 4.3.0
Pygments 2.1.3
pysqlite 2.6.0
Python 2.7.12+ (default, Sep 17 2016, 12:08:02)
[GCC 6.2.0 20160914]
python-oauth2 1.9.0.post1
pytz 2017.2
setuptools 36.6.0
SpamBayes 1.1b2
SQLite 3.14.1
jQuery 1.11.3
jQuery UI 1.11.4
jQuery Timepicker 1.5.5

Enabled Plugins

TracFullBlogPlugin 0.1.6.3
TracSpamFilter 1.2.0
TracTags 0.9
TracVote 0.6.0

Interface Customization

Python Traceback

Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/trac/web/main.py", line 623, in _dispatch_request
    dispatcher.dispatch(req)
  File "/usr/local/lib/python2.7/dist-packages/trac/web/main.py", line 249, in dispatch
    self._post_process_request(req, *resp)
  File "/usr/local/lib/python2.7/dist-packages/trac/web/main.py", line 453, in _post_process_request
    resp = f.post_process_request(req, *resp[:-1])
  File "/usr/local/lib/python2.7/dist-packages/tracvote/__init__.py", line 401, in post_process_request
    resource = resource_from_path(self.env, req.path_info)
  File "/usr/local/lib/python2.7/dist-packages/tracvote/__init__.py", line 97, in resource_from_path
    if _resource_exists(env, resource) in (None, True):
  File "/usr/local/lib/python2.7/dist-packages/tracvote/__init__.py", line 78, in _resource_exists
    return resource_exists(env, resource)
  File "/usr/local/lib/python2.7/dist-packages/trac/resource.py", line 469, in resource_exists
    return manager.resource_exists(resource)
  File "/usr/local/lib/python2.7/dist-packages/trac/attachment.py", line 386, in resource_exists
    attachment = Attachment(self.env, resource)
  File "/usr/local/lib/python2.7/dist-packages/trac/attachment.py", line 683, in __init__
    self.parent_realm = resource.parent.realm
AttributeError: 'NoneType' object has no attribute 'realm'

Attachments (0)

Change History (3)

comment:1 by Jun Omae, 7 years ago

Resolution: cantfix
Status: newclosed

comment:2 by Ryan J Ollos, 7 years ago

Description: modified (diff)

comment:3 by Ryan J Ollos, 7 years ago

Please ask on the MailingList. There are potentially a few things to discuss around your configuration.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The ticket will remain with no owner.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from (none) 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.