<div dir="ltr"><span style="font-size:12.8px;white-space:nowrap">Fenoy Gerald,</span><div><span style="font-size:12.8px;white-space:nowrap"><br></span><div><span style="font-size:12.8px;white-space:nowrap">Bingo. That was indeed the problem. Removed the py extension and it started working.</span></div><div><span style="font-size:12.8px;white-space:nowrap"><br></span></div><div><span style="font-size:12.8px;white-space:nowrap">I feel silly for not having tried that myself.</span></div><div><span style="font-size:12.8px;white-space:nowrap"><br></span></div><div><span style="font-size:12.8px;white-space:nowrap">Anyway, problem solved. Thanks a ton.</span></div><div><span style="font-size:12.8px;white-space:nowrap"><br></span></div><div><span style="font-size:12.8px;white-space:nowrap">Regards,</span></div><div><span style="font-size:12.8px;white-space:nowrap">Balajee.R.C</span></div><div><span style="font-size:12.8px;white-space:nowrap"><br></span></div><div><span style="font-size:12.8px;white-space:nowrap"><br></span></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jul 12, 2016 at 3:37 PM, Fenoy Gerald <span dir="ltr"><<a href="mailto:gerald.fenoy@geolabs.fr" target="_blank">gerald.fenoy@geolabs.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
I suppose that you have set the value « test.py » in your zcfg file for the serviceProvider. Nevertheless, it is not require to write the extension .py to the python module to be loaded. So you should use test rather than test.py to solve your issue.<br>
<br>
In case you have a subdirectory named test, then you may try adding a __init__.py file to make the ZOO-Kernel able to find the py module located in the test subdirectory.<br>
<br>
I hope it helps and yo can confirm that your issue is solved.<br>
<br>
Best regards,<br>
<div><div class="h5"><br>
> Le 11 juil. 2016 à 08:31, Balajee R.C <<a href="mailto:balajee@vizexperts.com">balajee@vizexperts.com</a>> a écrit :<br>
><br>
> I have built zoo from svn (rev. 784) with --with-python enabled. I am using Python version: 2.7.5<br>
><br>
> I have the following Python based service:<br>
><br>
> import zoo<br>
> def test(conf, inputs, outputs):<br>
> outputs["output"]["value"] = "Hello from Python World !"<br>
> return 3<br>
><br>
> When I execute the above service, I get the following error:<br>
><br>
> <?xml version="1.0" encoding="utf-8"?><br>
> <ows:ExceptionReport xmlns:ows="<a href="http://www.opengis.net/ows/1.1" rel="noreferrer" target="_blank">http://www.opengis.net/ows/1.1</a>" xmlns:xsi="<a href="http://www.w3.org/2001/XMLSchema-instance" rel="noreferrer" target="_blank">http://www.w3.org/2001/XMLSchema-instance</a>" xsi:schemaLocation="<a href="http://www.opengis.net/ows/1.1" rel="noreferrer" target="_blank">http://www.opengis.net/ows/1.1</a> <a href="http://schemas.opengis.net/ows/1.1.0/owsExceptionReport.xsd" rel="noreferrer" target="_blank">http://schemas.opengis.net/ows/1.1.0/owsExceptionReport.xsd</a>" xml:lang="en-US" version="1.1.0"><br>
> <ows:Exception exceptionCode="NoApplicableCode"><br>
> <ows:ExceptionText>Python module test.py cannot be loaded. Message: TRACE: No module named py<br>
> <type 'exceptions.ImportError'><br>
> </ows:ExceptionText><br>
> </ows:Exception><br>
> </ows:ExceptionReport><br>
><br>
> However, I do notice that they pyc file for my service test.py file HAS indeed been created. Hence, it appears that the trouble is that there is another module named py that it is trying to load.<br>
><br>
> I have already done pip install py for my python installation. When I launch my python interpreter directly and do:<br>
><br>
> import py<br>
><br>
> then this works without an error.<br>
><br>
> What could be going wrong? Can someone please point me in the right direction?<br>
><br>
> Regards,<br>
> Balajee.R.C<br>
</div></div>> _______________________________________________<br>
> Zoo-discuss mailing list<br>
> <a href="mailto:Zoo-discuss@lists.osgeo.org">Zoo-discuss@lists.osgeo.org</a><br>
> <a href="http://lists.osgeo.org/mailman/listinfo/zoo-discuss" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/zoo-discuss</a><br>
<br>
<br>
<br>
Gérald Fenoy<br>
<a href="http://wiki.osgeo.org/wiki/User:Djay" rel="noreferrer" target="_blank">http://wiki.osgeo.org/wiki/User:Djay</a><br>
<br>
<br>
</blockquote></div><br></div>