Edgewall Software
Modify

Opened 14 years ago

Closed 14 years ago

Last modified 4 years ago

#9553 closed defect (fixed)

TypeError: train() takes at least 5 non-keyword arguments (4 given)

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

Description

How to Reproduce

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

Manually pasting spam into the text field and clicking train as spam/ham. The Mark selected as spam/ham options on the monitoring page also fail to train bayes, but in that instance it fails quietly. Both the stable SpamBayes 1.0.4 and development 1.1a6 fail in the same way.

Request parameters:

{'__FORM_TOKEN': u'4005804e2c5029c088674356',
 'cat_id': u'spamfilter',
 'content': u'shouthstami\r\n\r\nlandscapes  <a href="http://www.betsielarkin.com/profiles/blogs/redtube-orgasme-redtube-videos">redtube</a>, kenji  http://www.betsielarkin.com/profiles/blogs/redtube-orgasme-redtube-videos - redtube, cheapest  <a href="http://forum.thesqlgroup.com/members/swdefr.aspx">redtube</a>, pandemics  http://forum.thesqlgroup.com/members/swdefr.aspx - redtube, corning  <a href="http://blogs.catch21.ca/members/rtfgvb.aspx">redtube</a>, serva  http://blogs.catch21.ca/members/rtfgvb.aspx - redtube, maketa  <a href="http://milfia.com/members/mnkjiu.aspx">redtube</a>, refine  http://milfia.com/members/mnkjiu.aspx - redtube, porphyrin ',
 'min_training': u'25',
 'panel_id': u'bayes',
 'path_info': None,
 'train': u'Train as Spam'}

User agent: Opera/9.80 (X11; Linux x86_64; U; en-GB) Presto/2.6.30 Version/10.60

System Information

Trac 0.12
Genshi 0.6
mod_wsgi 2.5 (WSGIProcessGroup trac WSGIApplicationGroup %{GLOBAL})
Pygments 0.10
pysqlite 2.4.1
Python 2.5.2 (r252:60911, Jan 24 2010, 18:02:01)
[GCC 4.3.2]
pytz 2008c
setuptools 0.6c11
SQLite 3.5.9
Subversion 1.5.1 (r32289)
jQuery 1.4.2

Enabled Plugins

TracSpamFilter 0.3.2dev-r9949
TracTicketDelete 2.0
TracTicketLock 0.1

Python Traceback

Traceback (most recent call last):
  File "build/bdist.linux-x86_64/egg/trac/web/main.py", line 513, in _dispatch_request
    dispatcher.dispatch(req)
  File "build/bdist.linux-x86_64/egg/trac/web/main.py", line 235, in dispatch
    resp = chosen_handler.process_request(req)
  File "build/bdist.linux-x86_64/egg/trac/admin/web_ui.py", line 116, in process_request
    path_info)
  File "/usr/lib/python2.5/site-packages/TracSpamFilter-0.3.2dev_r9949-py2.5.egg/tracspamfilter/admin.py", line 348, in render_admin_panel
    spam='spam' in req.args['train'].lower())
TypeError: train() takes at least 5 non-keyword arguments (4 given)

Attachments (0)

Change History (2)

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

Resolution: fixed
Status: newclosed

In r9992.

comment:2 by Remy Blank, 13 years ago

Milestone: plugin - spam-filter

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.