[Pywps-dev] configuration problem

Luís de Sousa luis.a.de.sousa at gmail.com
Thu Feb 11 10:54:48 PST 2016


Hi again Pablo,

Could you post a listing of your CGI wrapper? That is the best way to
undo this mystery.

Cheers,

Luís

On 11 February 2016 at 19:35, pablo zader <pzader at gmail.com> wrote:
> Hi Luis
>
> The problem I see is that the script is trying to read processes from a
> directory other
> than one I configure. You can see:
>
> PyWPS [2016-02-10 14:12:28,214] INFO: Importing the processes from default
> (pywps/processes) location
>
> But I configure this directory :
>
> /usr/local/wps/processes
>
> Apparently pywps is taking another configuration file.
>
> I am using "Local PyWPS configuration file"
> (http://geopython.github.io/pywps/doc/build/html/configuration/index.html).
>
> Is this correct? or should I use Global Settings ?
>
> Thanks in advanced
>
> Pablo
>
>
>
>
>
>
>
> 2016-02-11 4:37 GMT-03:00 Luís de Sousa <luis.a.de.sousa at gmail.com>:
>>
>> Hi Pablo,
>>
>> My best guess is that there is an error in the returner.py module.
>>
>> Luís
>>
>> On 10 February 2016 at 18:34, pablo zader <pzader at gmail.com> wrote:
>> > Hi Luis
>> > Thanks. But my problem is not solved.
>> >
>> > My configuration file is in the /usr/local/wps/pywps.cfg  and the most
>> > important content is:
>> >
>> > [server]
>> > maxoperations=30
>> > maxinputparamlength=1024
>> > maxfilesize=100mb
>> > tempPath=/tmp/pywps
>> > processesPath=/usr/local/wps/processes
>> > outputUrl=http://localhost/wps/wpsoutputs
>> > outputPath=/var/www/wps/wpsoutputs
>> > debug=true # deprecated since 3.2, use logLevel instead
>> > logFile=/tmp/pywps.log
>> > logLevel=INFO
>> >
>> > My process in /usr/local/wps/processes with content:
>> >
>> > buffer.py         dummyprocess.py   __init__.pyc   moreInstancesInOne.py
>> > returner.pyc  tests.pyc
>> > buffer.pyc        dummyprocess.pyc  moreInOne.py
>> > moreInstancesInOne.pyc
>> > r_stats.py    ultimatequestionprocess.py
>> > convertraster.py  __init__.py       moreInOne.pyc  returner.py
>> > tests.py      ultimatequestionprocess.pyc
>> >
>> >
>> > My __init__.py:
>> >
>> > __all__ =
>> >
>> > ["returner","dummyprocess","moreInOne","moreInstancesInOne","tests","ultimatequestionprocess","buffer","r_stats"]
>> >
>> >
>> > But the getcapabilities request, returns:
>> >
>> > PyWPS [2016-02-10 14:12:28,214] INFO: Importing the processes from
>> > default
>> > (pywps/processes) location
>> > Traceback (most recent call last):
>> >   File
>> >
>> > "/usr/local/lib/python2.7/dist-packages/pywps-3.2.2-py2.7.egg/pywps/Wps/__init__.py",
>> > line 180, in _initFromDirectory
>> >     locals(), [processSources.__name__])
>> > ImportError: No module named returner
>> > PyWPS [2016-02-10 14:12:28,215] WARNING: Could not import processes from
>> > 'processes': ImportError('No module named returner',)
>> > PyWPS Warning: Usage of
>> > PyWPS Warning:       from pywps.Process.Process import WPSProcess
>> > PyWPS Warning: is deprecated. Use
>> > PyWPS Warning:       from pywps.Process import WPSProcess
>> > PyWPS Warning: instead!
>> > PyWPS [2016-02-10 14:12:28,219] WARNING: Could not import process
>> > [<class
>> > tests.BBoxProcess3D at 0x2e657a0>]: TypeError("addBBoxInput() got an
>> > unexpected keyword argument 'crs'",)
>> > Traceback (most recent call last):
>> >   File
>> >
>> > "/usr/local/lib/python2.7/dist-packages/pywps-3.2.2-py2.7.egg/pywps/Wps/__init__.py",
>> > line 180, in _initFromDirectory
>> >     locals(), [processSources.__name__])
>> > ImportError: No module named GMLBuffer
>> > PyWPS [2016-02-10 14:12:28,220] WARNING: Could not import processes from
>> > 'processes': ImportError('No module named GMLBuffer',)
>> > Traceback (most recent call last):
>> >   File
>> >
>> > "/usr/local/lib/python2.7/dist-packages/pywps-3.2.2-py2.7.egg/pywps/Wps/__init__.py",
>> > line 180, in _initFromDirectory
>> >     locals(), [processSources.__name__])
>> > ImportError: No module named reducer
>> > PyWPS [2016-02-10 14:12:28,221] WARNING: Could not import processes from
>> > 'processes': ImportError('No module named reducer',)
>> > Traceback (most recent call last):
>> >   File
>> >
>> > "/usr/local/lib/python2.7/dist-packages/pywps-3.2.2-py2.7.egg/pywps/Wps/__init__.py",
>> > line 180, in _initFromDirectory
>> >     locals(), [processSources.__name__])
>> > ImportError: No module named histogramprocess
>> > PyWPS [2016-02-10 14:12:28,223] WARNING: Could not import processes from
>> > 'processes': ImportError('No module named histogramprocess',)
>> > PyWPS [2016-02-10 14:12:28,224] INFO: Following processes are imported:
>> > ['dummyprocess', 'ultimatequestionprocess', 'complexVector',
>> > 'complexRaster', 'noOutput', 'firstInstance', 'secondInstance',
>> > 'assyncprocess', 'bboxprocess', 'complexprocess', 'literalprocess',
>> > 'noinputsprocess']
>> > Content-Type: application/xml
>> >
>> > .....
>> > <wps:ProcessOfferings>
>> > <wps:Process wps:processVersion="0.1">
>> > <ows:Identifier>dummyprocess</ows:Identifier>
>> > <ows:Title>Dummy Process</ows:Title>
>> > <ows:Abstract>The Dummy process is used for testing the WPS structure.
>> > The
>> > process will accept 2 input numbers and will return the XML result with
>> > an
>> > add one and subtract one operation</ows:Abstract>
>> > </wps:Process>
>> > <wps:Process wps:processVersion="2.0">
>> > <ows:Identifier>ultimatequestionprocess</ows:Identifier>
>> > <ows:Title>Answer to Life, the Universe and Everything</ows:Title>
>> > <ows:Abstract>Numerical solution that is the answer to Life, Universe
>> > and
>> > Everything. The process is an improvement to Deep Tought computer
>> > (therefore
>> > version 2.0) since it no longer takes 7.5 milion years, but only a few
>> > seconds to give a response, with an update of status every 10
>> > seconds.</ows:Abstract>
>> > </wps:Process>
>> > <wps:Process wps:processVersion="None">
>> > <ows:Identifier>complexVector</ows:Identifier>
>> > <ows:Title>First Process</ows:Title>
>> > <ows:Abstract>Get vector imput and return it to output</ows:Abstract>
>> > </wps:Process>
>> > <wps:Process wps:processVersion="2.0">
>> > <ows:Identifier>complexRaster</ows:Identifier>
>> > <ows:Title>Second Process</ows:Title>
>> > </wps:Process>
>> > <wps:Process wps:processVersion="None">
>> > <ows:Identifier>noOutput</ows:Identifier>
>> > <ows:Title>No output given</ows:Title>
>> > </wps:Process>
>> > <wps:Process wps:processVersion="None">
>> > <ows:Identifier>firstInstance</ows:Identifier>
>> > <ows:Title>First instance process</ows:Title>
>> > </wps:Process>
>> > <wps:Process wps:processVersion="None">
>> > <ows:Identifier>secondInstance</ows:Identifier>
>> > <ows:Title>Second instance process</ows:Title>
>> > </wps:Process>
>> > <wps:Process wps:processVersion="None">
>> > <ows:Identifier>assyncprocess</ows:Identifier>
>> > <ows:Title>Assynchronous process</ows:Title>
>> > </wps:Process>
>> > <wps:Process wps:processVersion="None">
>> > <ows:Identifier>bboxprocess</ows:Identifier>
>> > <ows:Title>BBox process</ows:Title>
>> > </wps:Process>
>> > <wps:Process wps:processVersion="None">
>> > <ows:Identifier>complexprocess</ows:Identifier>
>> > <ows:Title>Complex process</ows:Title>
>> > </wps:Process>
>> > <wps:Process wps:processVersion="None">
>> > <ows:Identifier>literalprocess</ows:Identifier>
>> > <ows:Title>Literal process</ows:Title>
>> >                         <ows:Metadata xlink:title="Foobar"
>> > xlink:href="http://foo/bar" />
>> >                         <ows:Metadata xlink:title="Barfoo"
>> > xlink:href="http://bar/foo" />
>> >                         <ows:Metadata xlink:title="Literal process"
>> >
>> > xlink:href="http://localhost/cgi-bin/wps?service=WPS&request=DescribeProcess&version=1.0.0&identifier=literalprocess"
>> > />
>> >                         <ows:Metadata xlink:title="Literal process"
>> > xlink:href="http://foobar/" />
>> > </wps:Process>
>> > <wps:Process wps:processVersion="None">
>> > <ows:Identifier>noinputsprocess</ows:Identifier>
>> > <ows:Title>No inputs</ows:Title>
>> > </wps:Process>
>> > </wps:ProcessOfferings>
>> > ....
>> > </wps:Capabilities>
>> >
>> >
>> > 1 - I do not understand this reading processes pywps/processes rather
>> > than
>> > /usr/local/WPS/processes
>> > 2 - this reading another configuration file apparently different
>> >
>> >
>> > Thanks in advanced
>> >
>> >
>> > 2016-02-10 4:22 GMT-03:00 Luís de Sousa <luis.a.de.sousa at gmail.com>:
>> >>
>> >> Hi Pablo, two notes:
>> >>
>> >> 1. That PyWPS instance seems to be still importing processes from the
>> >> default location (pywps/pywps/processes); check your configuration
>> >> file.
>> >>
>> >> 2. PyWPS is issuing an exception with the processes returner and
>> >> histogramprocess; before querying PyWPS, making it is successfully
>> >> importing all your processes.
>> >>
>> >> Regards,
>> >>
>> >> Luís
>> >>
>> >> On 10 February 2016 at 06:24, pablo zader <pzader at gmail.com> wrote:
>> >> > Hi list
>> >> >
>> >> > I have the next problem: making a GetCapabilities, returns a list of
>> >> > processes that is different from what I have defined
>> >> >
>> >> > I have:
>> >> >
>> >> > $>ls /usr/local/wps/processes/
>> >> > buffer.py         dummyprocess.py   __init__.pyc
>> >> > moreInstancesInOne.py
>> >> > returner.pyc  tests.pyc
>> >> > buffer.pyc        dummyprocess.pyc  moreInOne.py
>> >> > moreInstancesInOne.pyc
>> >> > r_stats.py    ultimatequestionprocess.py
>> >> > convertraster.py  __init__.py       moreInOne.pyc  returner.py
>> >> > tests.py      ultimatequestionprocess.pyc
>> >> >
>> >> > $>more  /usr/local/wps/processes/__init__.py
>> >> > __all__ =
>> >> >
>> >> >
>> >> > ["returner","dummyprocess","moreInOne","moreInstancesInOne","tests","ultimatequestionprocess","buffer","r_stats"]
>> >> >
>> >> > But the query tells me that I have:
>> >> >
>> >> > ['dummyprocess', 'ultimatequestionprocess', 'complexVector',
>> >> > 'complexRaster', 'noOutput', 'firstInstance', 'secondInstance',
>> >> > 'assyncprocess', 'bboxprocess', 'complexprocess', 'literalprocess',
>> >> > 'noinputsprocess']
>> >> >
>> >> > Here the  complete response:
>> >> >
>> >> > $>wps.py "service=wps&request=getcapabilities"
>> >> > PyWPS [2016-02-10 02:15:38,256] INFO: Importing the processes from
>> >> > default
>> >> > (pywps/processes) location
>> >> > Traceback (most recent call last):
>> >> >   File
>> >> >
>> >> >
>> >> > "/usr/local/lib/python2.7/dist-packages/pywps-3.2.2-py2.7.egg/pywps/Wps/__init__.py",
>> >> > line 180, in _initFromDirectory
>> >> >     locals(), [processSources.__name__])
>> >> > ImportError: No module named returner
>> >> > PyWPS [2016-02-10 02:15:38,257] WARNING: Could not import processes
>> >> > from
>> >> > 'processes': ImportError('No module named returner',)
>> >> > PyWPS Warning: Usage of
>> >> > PyWPS Warning:       from pywps.Process.Process import WPSProcess
>> >> > PyWPS Warning: is deprecated. Use
>> >> > PyWPS Warning:       from pywps.Process import WPSProcess
>> >> > PyWPS Warning: instead!
>> >> > PyWPS [2016-02-10 02:15:38,260] WARNING: Could not import process
>> >> > [<class
>> >> > tests.BBoxProcess3D at 0xfd17a0>]: TypeError("addBBoxInput() got an
>> >> > unexpected keyword argument 'crs'",)
>> >> > Traceback (most recent call last):
>> >> >   File
>> >> >
>> >> >
>> >> > "/usr/local/lib/python2.7/dist-packages/pywps-3.2.2-py2.7.egg/pywps/Wps/__init__.py",
>> >> > line 180, in _initFromDirectory
>> >> >     locals(), [processSources.__name__])
>> >> > ImportError: No module named GMLBuffer
>> >> > PyWPS [2016-02-10 02:15:38,261] WARNING: Could not import processes
>> >> > from
>> >> > 'processes': ImportError('No module named GMLBuffer',)
>> >> > Traceback (most recent call last):
>> >> >   File
>> >> >
>> >> >
>> >> > "/usr/local/lib/python2.7/dist-packages/pywps-3.2.2-py2.7.egg/pywps/Wps/__init__.py",
>> >> > line 180, in _initFromDirectory
>> >> >     locals(), [processSources.__name__])
>> >> > ImportError: No module named reducer
>> >> > PyWPS [2016-02-10 02:15:38,263] WARNING: Could not import processes
>> >> > from
>> >> > 'processes': ImportError('No module named reducer',)
>> >> > Traceback (most recent call last):
>> >> >   File
>> >> >
>> >> >
>> >> > "/usr/local/lib/python2.7/dist-packages/pywps-3.2.2-py2.7.egg/pywps/Wps/__init__.py",
>> >> > line 180, in _initFromDirectory
>> >> >     locals(), [processSources.__name__])
>> >> > ImportError: No module named histogramprocess
>> >> > PyWPS [2016-02-10 02:15:38,264] WARNING: Could not import processes
>> >> > from
>> >> > 'processes': ImportError('No module named histogramprocess',)
>> >> > PyWPS [2016-02-10 02:15:38,265] INFO: Following processes are
>> >> > imported:
>> >> > ['dummyprocess', 'ultimatequestionprocess', 'complexVector',
>> >> > 'complexRaster', 'noOutput', 'firstInstance', 'secondInstance',
>> >> > 'assyncprocess', 'bboxprocess', 'complexprocess', 'literalprocess',
>> >> > 'noinputsprocess']
>> >> >
>> >> > Thanks in advanced
>> >> >
>> >> > Pablo
>> >> >
>> >> > _______________________________________________
>> >> > pywps-dev mailing list
>> >> > pywps-dev at lists.osgeo.org
>> >> > http://lists.osgeo.org/mailman/listinfo/pywps-dev
>> >
>> >
>> >
>> >
>> > --
>> > Pablo J. Zader
>> > Lic. en Cs. de la Computación
>> > pablo.zader at gmail.com
>> >
>> > "Los Grandes Hombres hablan sobre ideas...
>> >  Los Hombres Promedio hablan sobre cosas...
>> >  Los Hombres Pequeños hablan.. de otros Hombres.
>> >
>> > del libro Matemática estas ahi? A. Paenza "
>> >
>> > _______________________________________________
>> > pywps-dev mailing list
>> > pywps-dev at lists.osgeo.org
>> > http://lists.osgeo.org/mailman/listinfo/pywps-dev
>
>
>
>
> --
> Pablo J. Zader
> Lic. en Cs. de la Computación
> pablo.zader at gmail.com
>
> "Los Grandes Hombres hablan sobre ideas...
>  Los Hombres Promedio hablan sobre cosas...
>  Los Hombres Pequeños hablan.. de otros Hombres.
>
> del libro Matemática estas ahi? A. Paenza "


More information about the pywps-dev mailing list