Modify

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#12595 closed defect (fixed)

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

Reported by: Ryan J Ollos Owned by: Ryan J Ollos
Priority: normal Component: VotePlugin
Severity: normal Keywords:
Cc: Steffen Hoffmann Trac Release:

Description

Found the following in the logs, running version 0.4 of the plugin:

2015-11-28 07:06:10,616 Trac[main] ERROR: Internal Server Error: <RequestWithSession "GET '/changeset/160/tracfrenchtranslation/0.9/templates/newticket.cs'">, referrer 'https://bobcat.edgewall.com/'Traceback (most recent call last):
  File "/srv/trac-hacks.org/pve/lib/python2.7/site-packages/trac/web/main.py", line 554, in _dispatch_request    dispatcher.dispatch(req)
  File "/srv/trac-hacks.org/pve/lib/python2.7/site-packages/trac/web/main.py", line 257, in dispatch    self._post_process_request(req, *resp)
  File "/srv/trac-hacks.org/pve/lib/python2.7/site-packages/trac/web/main.py", line 388, in _post_process_request    resp = f.post_process_request(req, *resp)
  File "/srv/trac-hacks.org/pve/lib/python2.7/site-packages/tracvote/__init__.py", line 396, in post_process_request    resource = resource_from_path(self.env, req.path_info)
  File "/srv/trac-hacks.org/pve/lib/python2.7/site-packages/tracvote/__init__.py", line 95, in resource_from_path    if _resource_exists(env, resource) in (None, True):
  File "/srv/trac-hacks.org/pve/lib/python2.7/site-packages/tracvote/__init__.py", line 76, in _resource_exists
    return resource_exists(env, resource)
  File "/srv/trac-hacks.org/pve/lib/python2.7/site-packages/trac/resource.py", line 454, in resource_exists
    return manager.resource_exists(resource)
  File "/srv/trac-hacks.org/pve/lib/python2.7/site-packages/trac/versioncontrol/api.py", line 469, in resource_exists
    reponame = resource.parent.id
AttributeError: 'NoneType' object has no attribute 'id'

Attachments (0)

Change History (11)

comment:1 Changed 9 years ago by Ryan J Ollos

Issue likely occurs after [15059] with changeset for a default repository. I'm assuming in that case the resource.parent will be None.

comment:2 Changed 9 years ago by Ryan J Ollos

Status: newaccepted

comment:3 Changed 9 years ago by Ryan J Ollos

Rendering the voter for changesets would be a nice feature, but that's in the realm of #11073.

comment:4 Changed 9 years ago by Ryan J Ollos

Resolution: fixed
Status: acceptedclosed

In 15120:

0.5.0dev: Only extract the resource for votable paths

Fixes #12595.

comment:5 Changed 9 years ago by anonymous

Can you please release a patch release with this fix?

comment:6 Changed 9 years ago by Ryan J Ollos

0.5.0 will be released soon. You can just as well install from the trunk.

comment:7 Changed 9 years ago by anonymous

We did, but we hit this and bit us in the ass :/

comment:8 Changed 9 years ago by Ryan J Ollos

If you installed from the trunk and have 0.5.0dev installed, then the issue should be fixed. You may need to reinstall from the latest trunk.

comment:9 Changed 9 years ago by anonymous

I know, it's fixed for us using the trunk version. But it's a big issue that's why I suggested a new release as soon as possible.

For us it broke attachments.

comment:10 Changed 9 years ago by Ryan J Ollos

In 15435:

0.5.0: Release 0.5.0

Refs #12595.

comment:11 Changed 9 years ago by anonymous

Thanks!

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
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.