🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #87325

Re: PyClean installation

#87325
From: Julien ÉLIE
Date: Thu, 14 Jan 2016 20:45
49 lines
2869 bytes
Hi Steve,

> I've now tested the revised PyClean and it's been stable for a few days.
> Would you mind downloading it and trying again?  The modules are now
> merged into a single file, pyclean.py so you don't need to install it
> using the install script, it can be placed directly into the
> ~news/bin/filter directory and renamed as filter_innd.py (or symlinked).

Thanks for your new version.  It is indeed far easier to install!

* cd ~/bin/filter
* wget --no-check-certificate 
https://raw.githubusercontent.com/crooks/PyClean/master/pyclean/pyclean.py
* mv pyclean.py filter_innd.py
* ctlinnd reload filter.python "PyClean initial load"

And it worked!


I have deactivated Perl filtering to see how Python filtering performs.
Too bad INN still does not implement a filter_stats function for Python; 
it would allow stats from the Python filter in response to "ctlinnd 
mode".  We have one for Perl:

Perl filter stats: Pass: 43633  Reject: 1435  Refuse: 0  MD5: 16  PHL: 
53  PHN: 67  PHR: 0  FSL: 31



Hmmm, looking at ~/pyclean/log/traceback, I see:

Traceback (most recent call last):
   File "/home/news/bin/filter/filter_innd.py", line 302, in filter_art
     return self.pyfilter.filter(art)
   File "/home/news/bin/filter/filter_innd.py", line 808, in filter
     if self.emp_phn.add(fodder + ngs):
   File "/home/news/bin/filter/filter_innd.py", line 1180, in add
     h = md5(content).digest()
TypeError: 'module' object is not callable


Do you know how to fix that?

-- 
Julien ÉLIE

« Veni, uidi, et je n'en crois pas mes yeux ! » (César)

Technical Details
Message-ID: <n791cm$14v$1@news.trigofacile.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.(19219).mbox.7z!not-for-mail
References: <n4km8u$1ra$1@news.trigofacile.com> <slrnn95jel.lfk.steve@fleegle.mixmin.net> <slrnn9f49r.lfk.steve@fleegle.mixmin.net>

Show Full Headers
Complete Article Headers
Message-ID: <n791cm$14v$1@news.trigofacile.com>
Subject: Re: PyClean installation
Date: Thu, 14 Jan 2016 21:45:10 +0100
From: Julien ÉLIE <iulius@nom-de-mon-site.com.invalid>
References: <n4km8u$1ra$1@news.trigofacile.com> <slrnn95jel.lfk.steve@fleegle.mixmin.net> <slrnn9f49r.lfk.steve@fleegle.mixmin.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.(19219).mbox.7z!not-for-mail
Newsgroups: news.software.nntp
Organization: TrigoFACILE -- http://www.trigofacile.com/
Mime-Version: 1.0
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 14 Jan 2016 20:45:10 -0000 (UTC)
Injection-Info: news.trigofacile.com; posting-account="julien"; posting-host="aaubervilliers-651-1-340-31.w83-114.abo.wanadoo.fr:83.114.227.31";
 logging-data="1183"; mail-complaints-to="abuse@trigofacile.com"
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0)
 Gecko/20100101 Thunderbird/38.5.1
In-Reply-To: <slrnn9f49r.lfk.steve@fleegle.mixmin.net>
X-Received-Body-CRC: 1340941117
X-Received-Bytes: 2866