FAQ
After installing patch in comment #19 and #22 SpamAssassin.py patch I
started to get following error:

Aug 18 16:14:38 2010 (26738) Uncaught runner exception: unsupported operand type(s) for -=: 'float' and 'str'
Aug 18 16:14:39 2010 (26738) Traceback (most recent call last):
File "/usr/local/mailman/Mailman/Queue/Runner.py", line 120, in _oneloop
self._onefile(msg, msgdata)
File "/usr/local/mailman/Mailman/Queue/Runner.py", line 191, in _onefile
keepqueued = self._dispose(mlist, msg, msgdata)
File "/usr/local/mailman/Mailman/Queue/IncomingRunner.py", line 130, in _dispose
more = self._dopipeline(mlist, msg, msgdata, pipeline)
File "/usr/local/mailman/Mailman/Queue/IncomingRunner.py", line 153, in _dopipeline
sys.modules[modname].process(mlist, msg, msgdata)
File "/usr/local/mailman/Mailman/Handlers/SpamAssassin.py", line 83, in process
score -= MEMBER_BONUS
TypeError: unsupported operand type(s) for -=: 'float' and 'str'

I guess TypeError: unsupported operand type(s) for -=: 'float' and 'str'
is because the variable type are mixed up.

I changed score -= MEMBER_BONUS into score -= (MEMBER_BONUS) on line 83
and it seems to work ...

--
Add SpamAssassin filter to mail pipeline
https://bugs.launchpad.net/bugs/266588
You received this bug notification because you are a member of Mailman
Coders, which is subscribed to GNU Mailman.

Search Discussions

  • Mark Sapiro at Aug 18, 2010 at 9:35 pm
    Regarding comment #24:

    Have you defined SPAMASSASSIN_MEMBER_BONUS in Defaults.py and/or
    mm_cfg.py? Did you define it as a string rather than as a float? i.e.
    something like

    SPAMASSASSIN_MEMBER_BONUS = '5'

    as opposed to

    SPAMASSASSIN_MEMBER_BONUS = 5.0

    if MEMBER_BONUS actually has a string value, simply changing score -=
    MEMBER_BONUS into score -= (MEMBER_BONUS) won't help. Did you mean
    score -= float(MEMBER_BONUS)?

    --
    Add SpamAssassin filter to mail pipeline
    https://bugs.launchpad.net/bugs/266588
    You received this bug notification because you are a member of Mailman
    Coders, which is subscribed to GNU Mailman.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupmailman-coders @
categoriespython
postedAug 18, '10 at 3:04p
activeAug 18, '10 at 9:35p
posts2
users2
websitelist.org

2 users in discussion

Mark Sapiro: 1 post Mark.now: 1 post

People

Translate

site design / logo © 2022 Grokbase