Modify

Opened 6 years ago

Closed 6 years ago

#13326 closed defect (fixed)

AttributeError with bookmark in browser realm

Reported by: ntmlod Owned by: Jun Omae
Priority: normal Component: BookmarkPlugin
Severity: normal Keywords:
Cc: Trac Release: 1.0

Description

2017-11-07 01:56:45,297 Trac[main] ERROR: Internal Server Error:
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/trac/web/main.py", line 497, in _dispatch_request
    dispatcher.dispatch(req)
  File "/usr/lib/python2.7/site-packages/trac/web/main.py", line 214, in dispatch
    resp = chosen_handler.process_request(req)
  File "build/bdist.linux-x86_64/egg/tracbookmark/__init__.py", line 168, in process_request
    for url, name, username in self.get_bookmarks(req)]
  File "build/bdist.linux-x86_64/egg/tracbookmark/__init__.py", line 260, in _format_name
    name = get_resource_summary(self.env, resource)
  File "/usr/lib/python2.7/site-packages/trac/resource.py", line 347, in get_resource_summary
    return get_resource_description(env, resource, 'summary')
  File "/usr/lib/python2.7/site-packages/trac/resource.py", line 333, in get_resource_description
    return manager.get_resource_description(resource, format, **kwargs)
  File "/usr/lib/python2.7/site-packages/trac/versioncontrol/api.py", line 387, in get_resource_description
    node = repos.get_node(resource.id, resource.version)
AttributeError: 'NoneType' object has no attribute 'get_node'

I tried to figure out what's going on by myself :

I don't understand why the second pass through get_resource_description with 'summary' arg doesn't work.

Also I looked at BreadCrumbsNavPlugin because this plugin has more or less the same things to do. But it doesn't have a specific section to handle browser realm and avoids issue with a global test on resource breadcrumbsnavplugin/trunk/breadcrumbsnav/breadcrumbs.py@16589:185-186#L159.
Ultimately browser entries are ignored.

Attachments (0)

Change History (2)

comment:1 Changed 6 years ago by Jun Omae

Owner: changed from yosiyuki to Jun Omae
Status: newaccepted

comment:2 Changed 6 years ago by Jun Omae

Resolution: fixed
Status: acceptedclosed

In 16966:

BookmarkPlugin 1.0.0dev: fix an AttributeError when bookmarking browser page (closes #13326)

Modify Ticket

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