Edgewall Software

Opened 8 years ago

Last modified 8 years ago

#12613 closed defect

TracSpamFilter causes exception on /about page — at Initial Version

Reported by: Rainer Müller <raimue@…> Owned by: Dirk Stöcker
Priority: normal Milestone: 1.0.14
Component: general Version:
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

On visiting /about, I encountered the following exception:

2016-10-24 09:59:10,686 Trac[main] ERROR: Internal Server Error: <RequestWithSession "GET '/about'">, referrer None
Traceback (most recent call last):
  File "/var/www/trac/virtualenv/lib/python2.7/site-packages/trac/web/main.py", line 562, in _dispatch_request
    dispatcher.dispatch(req)
  File "/var/www/trac/virtualenv/lib/python2.7/site-packages/trac/web/main.py", line 249, in dispatch
    resp = chosen_handler.process_request(req)
  File "/var/www/trac/virtualenv/lib/python2.7/site-packages/trac/about.py", line 66, in process_request
    data['systeminfo'] = self.env.get_systeminfo()
  File "/var/www/trac/virtualenv/lib/python2.7/site-packages/trac/env.py", line 304, in get_systeminfo
    info.extend(provider.get_system_info() or [])
  File "/var/www/trac/virtualenv/lib/python2.7/site-packages/tracspamfilter/filtersystem.py", line 456, in get_system_info
    yield 'dnspython', get_pkginfo(dns)['version']
KeyError: 'version'

This is on a standard Debian 8 jessie installation, with python-dnspython 1.12.0-1. The trac.util.get_pkginfo function returns an empty dict when asking for the version of the module. This in itself might be another bug in Trac or it needs to be fixed in Debian's packaging.

$ python -c 'import dns; from trac.util import get_pkginfo; print get_pkginfo(dns)'
{}

Change History (1)

by Rainer Müller <raimue@…>, 8 years ago

Workaround

Note: See TracTickets for help on using tickets.