Edgewall Software
Modify

Opened 5 years ago

Closed 5 years ago

#12215 closed defect (duplicate)

ERROR: Filter strategy <tracspamfilter.filters.trapfield.TrapFieldFilterStrategy object at 0x812b434c> raised exception: expected string or buffer

Reported by: Ryan J Ollos Owned by: Ryan J Ollos
Priority: normal Milestone:
Component: plugin/spamfilter Version:
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

Found this in the log file. I'll investigate trapping the error to avoid the traceback.

2015-09-23 01:37:39,931 Trac[filtersystem] ERROR: Filter strategy <tracspamfilter.filters.trapfield.TrapFieldFilterStrategy object at 0x812b434c> raised exception: expected string or buffer
Traceback (most recent call last):
  File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/TracSpamFilter-1.0.6.dev0-py2.6.egg/tracspamfilter/filtersystem.py", line 192, in test
    retval = strategy.test(req, author, content, ip)  File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/TracSpamFilter-1.0.6.dev0-py2.6.egg/tracspamfilter/filters/trapfield.py", line 65, in test    i = shorten_line(javascript_quote(i), 50)
  File "build/bdist.linux-i686/egg/trac/util/text.py", line 155, in javascript_quote
    return _js_quote_re.sub(replace, text)TypeError: expected string or buffer

Attachments (0)

Change History (4)

comment:1 by Ryan J Ollos, 5 years ago

Component: generalplugin/spamfilter
Owner: set to Dirk Stöcker

comment:2 by Ryan J Ollos, 5 years ago

Will also look into trapping this exception:

2015-10-22 02:26:27,839 Trac[filtersystem] ERROR: Filter strategy <tracspamfilter.captcha.api.CaptchaSystem object at 0x829d9a8c> raised exception: connection already closed
Traceback (most recent call last):
  File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/TracSpamFilter-1.0.6.dev0-py2.6.egg/tracspamfilter/filtersystem.py", line 217, in test
    self._record_action('test','empty', '', strategy, tim)
  File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/TracSpamFilter-1.0.6.dev0-py2.6.egg/tracspamfilter/filtersystem.py", line 466, in _record_action
    stats.insert_or_update(name, action, data, status, delay, 1 if strategy.is_external() else 0)
  File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/TracSpamFilter-1.0.6.dev0-py2.6.egg/tracspamfilter/model.py", line 396, in insert_or_update
    delay, delay, external, int(time())))
  File "build/bdist.linux-i686/egg/trac/db/api.py", line 159, in __exit__
    self.db.rollback()
InterfaceError: connection already closed
Last edited 5 years ago by Jun Omae (previous) (diff)

comment:3 by Ryan J Ollos, 5 years ago

Owner: changed from Dirk Stöcker to Ryan J Ollos
Status: newassigned

comment:4 by Ryan J Ollos, 5 years ago

Milestone: plugin - spam-filter
Resolution: duplicate
Status: assignedclosed

Duplicate of #12269.

Modify Ticket

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