Skip to content

pyClean fails to filter, logs an error in traceback on FreeBSD 13.1 / INN 2.7.0rc1 / Python 3.8.13 #5

Description

@jrehmer

I started to notice that one of my readers wasn't rejecting articles for which I added specific bad_from entries and began looking for the cause to find that pyClean was not filtering when INN 2.7.0rc1 is compiled with Python 3.8 on FreeBSD 13.1. The filter starts up and normal items are logged in pyclean/log/pyclean.log, it runs/logs its maintenance tasks, but no articles are filtered. I notice in pyclean/log/traceback the following error:

Traceback (most recent call last):
File "/usr/local/news/bin/filter/filter_innd.py", line 324, in filter_art
return self.pyfilter.filter(art)
File "/usr/local/news/bin/filter/filter_innd.py", line 565, in filter
post['from_email'] = self.addressParse(art['From'])
File "/usr/local/news/bin/filter/filter_innd.py", line 1005, in addressParse
name, email = parseaddr(addr)
File "/usr/local/lib/python3.8/email/utils.py", line 212, in parseaddr
addrs = _AddressList(addr).addresslist
File "/usr/local/lib/python3.8/email/_parseaddr.py", line 511, in __init__
self.addresslist = self.getaddrlist()
File "/usr/local/lib/python3.8/email/_parseaddr.py", line 255, in getaddrlist
ad = self.getaddress()
File "/usr/local/lib/python3.8/email/_parseaddr.py", line 265, in getaddress
self.gotonext()
File "/usr/local/lib/python3.8/email/_parseaddr.py", line 238, in gotonext
if self.field[self.pos] in self.LWS + '\n\r':
TypeError: 'in <string>' requires string as left operand, not int

Not a Python guy and was not able to figure out exactly why, but when I installed the python27 (2.7.18) package and re-compiled INN everything is working as expected. I was able to reproduce this behavior on multiple FreeBSD 13.1 servers.

OS Version and Packages:

root@feed1:/usr/local/news/inn-2.7.0rc1 # uname -mrs
FreeBSD 13.1-RELEASE amd64
python27-2.7.18_1 Interpreted object-oriented programming language
python38-3.8.13 Interpreted object-oriented programming language

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions