failed to import external python module
david at hlacik.eu
Tue Jun 17 07:16:30 UTC 2008
Yes i have filter_innd.py,
Everything work fine ,except i cant import my custom module named pdg.py.
Module is located in same directory as nnrpd_auth.py and nnrpd_access.py
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.
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.
On Mon, Jun 16, 2008 at 8:10 PM, Julien ÉLIE <julien at trigofacile.com> wrote:
> Hi David,
> after installation of inn-STABLE-20080615 i am getting this message in
>> logs :
>> Jun 15 23:25:42 dev01 innd: python interpreter initialized OK
>> Jun 15 23:25:42 dev01 innd: failed to import external python module
>> Jun 15 23:25:42 dev01 innd: python filter object is not defined
>> Jun 15 23:25:42 dev01 innd: SERVER Python filtering disabled
>> Jun 15 23:25:42 dev01 innd: SERVER starting
>> What does it means? failed to import external python module ...
> I thought there was a bug in last STABLE seeing your report. However,
> Python filters
> work fine in inn-STABLE-20080615 (and 16).
> They start well and they reload well.
> Jun 16 19:58:34 news innd: python interpreter initialized OK
> Jun 16 19:58:34 news innd: python: First load, so I can do initialization
> Jun 16 19:58:34 news innd: python: spamfilter successfully hooked into INN
> Jun 16 19:58:34 news innd: SERVER Python filtering enabled
> Jun 16 19:58:34 news innd: defined python methods
> Jun 16 19:58:34 news innd: SERVER starting
> As for the error, I assume there is a problem with your scripts.
> Loading it does not work since it cannot import it.
> Hmm... Just to be sure, because you always spoke about nnrpd Python
> do you still have the file named filter_innd.py in your pathfilter
> The default is <pathnews>/bin/filter and this filter is required by innd
> so Python filters will not work if you do not have this file.
> And you cannot rename it.
> Julien ÉLIE
> « Dans l'algèbre comme dans la police, il faut identifier X. » (André
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the inn-workers