Yes i have filter_innd.py,<br><br>Everything work fine ,except i cant import my custom module named pdg.py.<br>Module is located in same directory as nnrpd_auth.py and nnrpd_access.py<br>I will import it on top of the file using import pdg.py, but still i cant use it. Import is fine, but first call of method inside this module will stop with result in lod ... mod_auth.py returned wrong result.<br>
So my workaround is using import commands, and calling commands.getoutput('/usr/lib/news/bin/filter/news_auth.py) ... which will call the script using pdg.py and print to standard output result. Using command i mentioned i will read from standard output result and that works. but still ... it is not nice.<br>
<br>Regards,<br><br>D.<br><br><div class="gmail_quote">On Mon, Jun 16, 2008 at 8:10 PM, Julien ÉLIE <<a href="mailto:julien@trigofacile.com">julien@trigofacile.com</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi David,<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d">
after installation of inn-STABLE-20080615 i am getting this message in logs :<br>
<br></div><div class="Ih2E3d">
Jun 15 23:25:42 dev01 innd: python interpreter initialized OK<br>
Jun 15 23:25:42 dev01 innd: failed to import external python module<br>
Jun 15 23:25:42 dev01 innd: python filter object is not defined<br>
Jun 15 23:25:42 dev01 innd: SERVER Python filtering disabled<br>
Jun 15 23:25:42 dev01 innd: SERVER starting<br>
<br></div><div class="Ih2E3d">
What does it means? failed to import external python module ...<br>
</div></blockquote>
<br>
I thought there was a bug in last STABLE seeing your report.  However, Python filters<br>
work fine in inn-STABLE-20080615 (and 16).<br>
They start well and they reload well.<br>
<br>
Jun 16 19:58:34 news innd: python interpreter initialized OK<br>
Jun 16 19:58:34 news innd: python: First load, so I can do initialization stuff.<br>
Jun 16 19:58:34 news innd: python: spamfilter successfully hooked into INN<br>
Jun 16 19:58:34 news innd: SERVER Python filtering enabled<br>
Jun 16 19:58:34 news innd: defined python methods<br>
Jun 16 19:58:34 news innd: SERVER starting<br>
<br>
<br>
As for the error, I assume there is a problem with your scripts.<br>
Loading it does not work since it cannot import it.<br>
<br>
Hmm... Just to be sure, because you always spoke about nnrpd Python filters,<br>
do you still have the file named filter_innd.py in your pathfilter directory?<br>
The default is <pathnews>/bin/filter and this filter is required by innd<br>
so Python filters will not work if you do not have this file.<br>
And you cannot rename it.<br><font color="#888888">
<br>
-- <br>
Julien ÉLIE<br>
<br>
« Dans l'algèbre comme dans la police, il faut identifier X. » (André Frédérique) <br>
</font></blockquote></div><br>