Edgewall Software
Modify

Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#9664 closed defect (fixed)

NameError: global name 'attachment_karma' is not defined

Reported by: cvicente Owned by: Dirk Stöcker
Priority: normal Milestone: plugin - spam-filter
Component: plugin/spamfilter Version: 0.12
Severity: blocker Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

How to Reproduce

While doing a POST operation on /admin/spamfilter/config, Trac issued an internal error.

(please provide additional details here)

Request parameters:

{'ExternalLinksFilterStrategy_karmapoints': u'2',
 'IPThrottleFilterStrategy_karmapoints': u'3',
 'RegexFilterStrategy_karmapoints': u'5',
 'SessionFilterStrategy_karmapoints': u'9',
 'TypePadFilterStrategy_karmapoints': u'5',
 '__FORM_TOKEN': u'2560ab07e017f5c36acd58f8',
 'attachment_karma': u'0',
 'cat_id': u'spamfilter',
 'logging_enabled': u'on',
 'min_karma': u'3',
 'panel_id': u'config',
 'path_info': None,
 'purge_age': u'14',
 'trust_authenticated': u'on'}

User agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_8; en-us) AppleWebKit/533.17.8 (KHTML, like Gecko) Version/5.0.1 Safari/533.17.8

System Information

Trac 0.12
Genshi 0.6
mod_python 3.2.8
pysqlite 2.6.0
Python 2.4.3 (#1, Jun 11 2009, 14:09:58)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-44)]
setuptools 0.6c8
SQLite 3.7.2
Subversion 1.4.2 (r22196)
jQuery 1.4.2

Enabled Plugins

TracSpamFilter 0.4.1dev-r10119

Python Traceback

Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/Trac-0.12-py2.4.egg/trac/web/main.py", line 513, in _dispatch_request
    dispatcher.dispatch(req)
  File "/usr/lib/python2.4/site-packages/Trac-0.12-py2.4.egg/trac/web/main.py", line 235, in dispatch
    resp = chosen_handler.process_request(req)
  File "/usr/lib/python2.4/site-packages/Trac-0.12-py2.4.egg/trac/admin/web_ui.py", line 116, in process_request
    path_info)
  File "/usr/lib/python2.4/site-packages/TracSpamFilter-0.4.1dev_r10119-py2.4.egg/tracspamfilter/admin.py", line 59, in render_admin_panel
    if self._process_config_panel(req):
  File "/usr/lib/python2.4/site-packages/TracSpamFilter-0.4.1dev_r10119-py2.4.egg/tracspamfilter/admin.py", line 125, in _process_config_panel
    self.config.set('spam-filter', 'attachment_karma', attachment_karma)
NameError: global name 'attachment_karma' is not defined

Attachments (0)

Change History (5)

comment:1 by Remy Blank, 14 years ago

Milestone: plugin - spam-filter

comment:2 by anonymous, 14 years ago

Typo on line 124 of admin.py. min_karma should be attachment_karma.

comment:3 by Remy Blank, 14 years ago

Owner: set to Dirk Stöcker

comment:4 by Dirk Stöcker, 14 years ago

Resolution: fixed
Status: newclosed

Fixed in r10212.

comment:5 by Dirk Stöcker, 14 years ago

Component: admin/webplugin/spamfilter

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Dirk Stöcker.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Dirk Stöcker 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.