[Pywps-dev] Import qgis.core into PyWPS process

Jáchym Čepický jachym.cepicky at gmail.com
Mon Jan 2 12:22:11 PST 2017


Hi,

as Salvatore is writing, check your error.log file, there should be more

and maybe you will have to either fix PYTHONPATH, as Salvatore is 
pointing out, or add

```
import sys
sys.path.append('/path/to/your/qgis/libs')
```

at beginning of the script

J

Dne 2.1.2017 v 20:31 Salvatore Larosa napsal(a):
> Hi,
>
> On Mon, Jan 2, 2017 at 4:31 PM, Eduardo Silverio da Silva <
> eduardosilverio1990 at gmail.com> wrote:
>
>> Hello people,
>>
>> I have a python script that uses some classes from qgis and it runs
>> correctly in my standalone app (IDLE Python). But when I try to publish the
>> script through PyWPS (3.2.5), the process does not apear in the list of
>> GetCapabilities. I think the problem is with the following imports:
>>
>> from qgis.core import *
>> from qgis.gui import *
>> from processing.core.Processing import Processing
>>
>> When I comment these lines the algorithm is showed.
>>
>
> I guess the problem is with your environment variable, you should add the
> QGIS python and plugins paths to PYTHONPATH and probably the QGIS lib path
> to LD_LIBRARY.
>
> Also, any error message could be useful in order to get some help from the
> community. :)
>
> Regards,
> -SL
>
>
>
>
> _______________________________________________
> pywps-dev mailing list
> pywps-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/pywps-dev
>

-- 
Jachym Cepicky
e-mail: jachym.cepicky at gmail.com
twitter: @jachymc


More information about the pywps-dev mailing list