Modify ↓
#7468 closed defect (duplicate)
TypeError: int() argument must be a string or a number, not 'NoneType'
Reported by: | sss | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | plugin/spamfilter | Version: | 0.11 |
Severity: | normal | 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:
{'AkismetFilterStrategy_karmapoints': u'5', 'CaptchaSystem_karmapoints': u'10', 'ExternalLinksFilterStrategy_karmapoints': u'2', 'IPThrottleFilterStrategy_karmapoints': u'3', 'RegexFilterStrategy_karmapoints': u'5', 'SessionFilterStrategy_karmapoints': u'9', '__FORM_TOKEN': u'a7d0ae013a486e9fd0ae6e40', 'cat_id': u'spamfilter', 'logging_enabled': u'on', 'min_karma': u'5', 'panel_id': u'config', 'path_info': None}
User Agent was: Mozilla/5.0 (X11; U; Linux x86_64; ru-RU; rv:1.8.1.16) Gecko/20080717 SeaMonkey/1.1.11
System Information
Trac | 0.11
|
Python | 2.5.2 (r252:60911, Jun 3 2008, 09:52:39) [GCC 4.2.4 (Gentoo 4.2.4 p1.0)]
|
setuptools | 0.6c8
|
MySQL | server: "5.0.60-log", client: "5.0.60", thread-safe: 1
|
MySQLdb | 1.2.2
|
Genshi | 0.5.1
|
mod_python | 3.3.1
|
Pygments | 0.10
|
Subversion | 1.5.0 (r31699)
|
jQuery: | 1.2.3
|
Python Traceback
Traceback (most recent call last): File "/usr/lib/python2.5/site-packages/trac/web/main.py", line 423, in _dispatch_request dispatcher.dispatch(req) File "/usr/lib/python2.5/site-packages/trac/web/main.py", line 197, in dispatch resp = chosen_handler.process_request(req) File "/usr/lib/python2.5/site-packages/trac/admin/web_ui.py", line 109, in process_request path_info) File "/usr/lib/python2.5/site-packages/TracSpamFilter-0.2.1cdev_r6883-py2.5.egg/tracspamfilter/admin.py", line 69, in render_admin_panel if self._process_config_panel(req): File "/usr/lib/python2.5/site-packages/TracSpamFilter-0.2.1cdev_r6883-py2.5.egg/tracspamfilter/admin.py", line 159, in _process_config_panel purge_age = int(req.args.get('purge_age')) TypeError: int() argument must be a string or a number, not 'NoneType'
Attachments (0)
Note:
See TracTickets
for help on using tickets.
The parameter
purge_age
is missing from the POST data, butlogging_enabled
ison
, so theoretically, thepurge_age
control should have been enabled.I wonder if the JavaScript snippet at the top of the template
admin_spamconfig.html
is correct. It calls.click()
on thelogging_enabled
control. Won't this toggle the control? Shouldn't.change()
be used?