Edgewall Software

Ticket #7468 (new defect)

Opened 5 months ago

Last modified 3 months ago

TypeError: int() argument must be a string or a number, not 'NoneType'

Reported by: sss Owned by:
Priority: normal Milestone: not applicable
Component: plugin/spamfilter Version: 0.11
Severity: normal Keywords:
Cc:

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

Change History

Changed 3 months ago by rblank

  • milestone set to not applicable

The parameter purge_age is missing from the POST data, but logging_enabled is on, so theoretically, the purge_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 the logging_enabled control. Won't this toggle the control? Shouldn't .change() be used?

Add/Change #7468 (TypeError: int() argument must be a string or a number, not 'NoneType')

Author



Change Properties
<Author field>
Action
as new
as The resolution will be set. Next status will be 'closed'
to The owner will change from (none). Next status will be 'new'
The owner will change from (none) to anonymous. Next status will be 'assigned'
 
Note: See TracTickets for help on using tickets.