<div dir="ltr">I have checked the GetCapabilities by accessing: <a href="http://localhost:8080/cgi-bin/pywps.cgi?service=wps&request=GetCapabilities&version=1.0.0">http://localhost:8080/cgi-bin/pywps.cgi?service=wps&request=GetCapabilities&version=1.0.0</a><div>and it is okay. I can even execute the example process "inputs_added".</div><div><br></div><div>Then a have checked the log messages and the result is:</div><div><br></div><div><div>PyWPS [2017-01-02 18:49:34,355] INFO: Setting PYWPS_PROCESSES from configuration file to c:/pywps/pywps_processes</div><div>PyWPS [2017-01-02 18:49:34,388] WARNING: Could not import processes from 'pywps_processes': ImportError('No module named qgis.core',)</div><div>PyWPS [2017-01-02 18:49:34,424] INFO: Following processes are imported: ['inputs_added']</div><div>Traceback (most recent call last):</div><div>  File "C:/pywps\pywps\Wps\__init__.py", line 174, in _init_from_directory</div><div>    [processSources.__name__])</div><div>  File "c:/pywps/pywps_processes\processing.py", line 2, in <module></div><div>    from qgis.core import *</div><div>ImportError: No module named qgis.core</div></div><div><br></div><div>As we can see, the only process imported was the "input_added", while my other algorithm "processing" gave an ImportError.</div><div><br></div><div>Eduardo,</div><img width="0" height="0" class="mailtrack-img" src="https://mailtrack.io/trace/mail/7457f0ef9ffeb5883c01d3a9e84ee3013b68d293.png?u=394009"></div><div class="gmail_extra"><br><div class="gmail_quote">2017-01-02 18:42 GMT-02:00 Jáchym Čepický <span dir="ltr"><<a href="mailto:jachym.cepicky@gmail.com" target="_blank">jachym.cepicky@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
first check, if your GetCapabilities response is ok (<a href="http://server/wps?service=wps&request=getcapabilities" rel="noreferrer" target="_blank">http://server/wps?service=wps<wbr>&request=getcapabilities</a>) - maybe the plugin is corrupted (it's not the stablest piece of software).<br>
<br>
Then please one more time: check the error.log of your web server, there should be written more - you can pass any exception or error message either to the mailing list or share it via <a href="http://pastebin.net" rel="noreferrer" target="_blank">pastebin.net</a> or similar service<br>
<br>
J<br>
<br>
Dne 2.1.2017 v 21:38 Eduardo Silverio da Silva napsal(a):<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
In my case I am using QGIS 2.18 (x32) and Python 2.7.13 (x32) on Windows<br>
10, and I have already added the following environment variables:<br>
<br>
PYTHONPATH:<br>
C:\Program Files (x86)\QGIS 2.18\apps\qgis\python<br>
C:\Program Files (x86)\QGIS 2.18\apps\qgis\python\plugins<br>
C:\Program Files (x86)\QGIS 2.18\apps\Python27\Lib\site-pa<wbr>ckages<br>
<br>
PATH:<br>
C:\Program Files (x86)\QGIS 2.18\bin<br>
C:\Program Files (x86)\QGIS 2.18\apps\qgis\bin<br>
C:\Python27<br>
C:\Python27\Scripts<br>
<br>
Here is the code where I want to import the classes:<br>
<br>
#I would like to use these classes:<br>
# from qgis.core import *<br>
# from qgis.gui import *<br>
# from processing.core.Processing import Processing<br>
# import processing<br>
<br>
from pywps.Process import WPSProcess<br>
from types import FloatType<br>
<br>
class Process(WPSProcess):<br>
     def __init__(self):<br>
         WPSProcess.__init__(self,<br>
              identifier       = "processar",<br>
              title            = "Title",<br>
              version          = "1",<br>
              storeSupported   = "false",<br>
              statusSupported  = "false",<br>
              abstract         = "Abstract")<br>
<br>
         self.value1 = self.addLiteralInput(identifie<wbr>r = "value1", title =<br>
"Input 1", type = FloatType)<br>
         self.value2 = self.addLiteralInput(identifie<wbr>r = "value2", title =<br>
"Input 2", type = FloatType)<br>
         self.result = self.addLiteralOutput(identifi<wbr>er = "result", title =<br>
"Result", type = FloatType)<br>
<br>
     def execute(self):<br>
    # Here I would like to write the necessary code to execute the<br>
qgis:extractnodes algorithm:<br>
    # processing.runalg('qgis:extrac<wbr>tnodes', 'river.shp', 'output.shp')<br>
<br>
v1 = self.value1.getValue()<br>
         v2 = self.value2.getValue()<br>
         self.result.setValue(v1 + v2)<br>
         return<br>
------------------------------<wbr>--------<br>
<br>
But even with those PATH variables configured I could not access the<br>
algorithm via WPS-client plugin.<br>
<br>
Regards,<br>
<br>
<br></div></div><div><div class="h5">
2017-01-02 17:31 GMT-02:00 Salvatore Larosa <<a href="mailto:lrssvtml@gmail.com" target="_blank">lrssvtml@gmail.com</a>>:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
On Mon, Jan 2, 2017 at 4:31 PM, Eduardo Silverio da Silva <<br>
<a href="mailto:eduardosilverio1990@gmail.com" target="_blank">eduardosilverio1990@gmail.com</a>> wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello people,<br>
<br>
I have a python script that uses some classes from qgis and it runs<br>
correctly in my standalone app (IDLE Python). But when I try to publish the<br>
script through PyWPS (3.2.5), the process does not apear in the list of<br>
GetCapabilities. I think the problem is with the following imports:<br>
<br>
from qgis.core import *<br>
from qgis.gui import *<br>
from processing.core.Processing import Processing<br>
<br>
When I comment these lines the algorithm is showed.<br>
<br>
</blockquote>
<br>
I guess the problem is with your environment variable, you should add the<br>
QGIS python and plugins paths to PYTHONPATH and probably the QGIS lib path<br>
to LD_LIBRARY.<br>
<br>
Also, any error message could be useful in order to get some help from the<br>
community. :)<br>
<br>
Regards,<br>
-SL<br>
<br>
<br>
--<br>
Salvatore Larosa<br>
linkedIn: <a href="http://linkedin.com/in/larosasalvatore" rel="noreferrer" target="_blank">http://linkedin.com/in/larosas<wbr>alvatore</a><br>
twitter: @lrssvt<br>
skype: s.larosa<br>
IRC: lrssvt on freenode<br>
<br>
</blockquote>
<br>
<br>
<br>
<br>
<br></div></div><span class="">
______________________________<wbr>_________________<br>
pywps-dev mailing list<br>
<a href="mailto:pywps-dev@lists.osgeo.org" target="_blank">pywps-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/pywps-dev" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman<wbr>/listinfo/pywps-dev</a><br>
<br>
</span></blockquote><div class="HOEnZb"><div class="h5">
<br>
-- <br>
Jachym Cepicky<br>
e-mail: <a href="mailto:jachym.cepicky@gmail.com" target="_blank">jachym.cepicky@gmail.com</a><br>
twitter: @jachymc<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><span style="font-size:12.8000001907349px">Eduardo Silverio da Silva</span><br></div><div>Mestrando em Ciências Geodésicas na Universidade Federal do Paraná</div><div>Engenheiro Cartógrafo e Agrimensor</div><div>+55 41 99873-6274</div></div></div></div></div></div></div></div></div>
</div>