[Zoo-discuss] ZOOGrassModuleStarter instance has no attribute 'logfile

pablo zader pzader at gmail.com
Mon May 4 06:21:34 PDT 2015


Dear Fenoy

Thanks for the clarification and correctness in a reply. Clearly the full
stack of python is a very useful to track and find the error help. Maybe
what I propose is a suggestion for improvement in the future.
The zoo project is very good!

Thanks
Pablo

2015-05-04 4:47 GMT-03:00 Fenoy Gerald <gerald.fenoy at geolabs.fr>:

> Dear Pablo,
> the issue is that for the GRASS-GIS support we are now using the Python
> support to access GRASS capabilities. So, obviously this leads to some
> understandable error messages. Nevertheless, I would like to let you know
> that for each Python error occurring from any service, there is a basic
> callback function which is called to display the full python stack. Which I
> think is quite straightforward and usable in many cases.
>
> So even if you are right saying that we should have better error message
> for this specific issue, it seems a bit difficult to treat it in a
> different way that the Python support do.
>
> One choice should be to integrate the GRASS-GIS support using directly its
> native language, this way we can return specific errors messages coming
> from the GRASS-GIS using functions such as G_set_error_routine() to handle
> the way we want any error messages coming from GRASS-GIS.
>
> In fact, I have the idea in mind to support GRASS-GIS from the ZOO-Kernel
> in the same way we do for both OrfeoTollbox and SAGA-GIS for some time,
> this should solve your specific issue but will require some time to make it
> available. Furthermore, as we are now implementing the WPS 2.0.0 support
> which will be available soon, this will postpone, unfortunately the
> internal GRASS-GIS support for still some time.
>
> I hope you can understand that the error message is not really specific to
> your issue but illustrate the basic python stack trace supported for each
> Python services.
>
> I hope you will find your answer in my email.
> Best regards,
>
>
> > Le 3 mai 2015 à 23:05, pablo zader <pzader at gmail.com> a écrit :
> >
> > Dear Quang
> >
> > Yes, like this here "
> http://code.google.com/p/wps-grass-bridge/source/browse/trunk/ZOOGrassModuleStarter.py?r=9&spec=svn9"
> works perfectly, but if you look right there mentioned, If I want  I
> changue the path.
> > Turning again to my original question if that path there and if you
> forgot create, the service will not work! and  error message to return ZOO
> does not refer to this error, it is not clear.
> >
> > # !!!!! EDIT THIS SECTION !!!!!
> > # Some default variables. Override them to your needs.   <---- HERE
> > WORKDIR="/tmp"
> > OUTPUTDIR="/tmp"
> > LOGFILE="logfile.txt"
> > LOGFILE_MODULE_STDOUT="logfile_module_stdout.txt"
> > LOGFILE_MODULE_STDERR="logfile_module_sterr.txt"
> >
> GRASS_GIS_BASE="/home/soeren/src/grass7.0/grass_trunk/dist.i686-pc-linux-gnu"
> >
> GRASS_ADDON_PATH="/home/soeren/src/vtkGRASSBridge/vtk-grass-bridge/WPS/Testing/Python/GrassAddons"
> > GRASS_VERSION="7.0.svn"
> > # !!!!! END EDIT SECTION !!!!!
> >
> > Pablo
> >
> >
> >
> > 2015-05-03 17:18 GMT-03:00 truongxuan quang <truongxuanquang at yahoo.com>:
> > Dear Pablo
> >
> > I am aslo ZOO-Project user, did you try  to set your configure file with
> /tmp/(without zoo)/...
> > I think it works perfectly!
> >
> > I don't  know which version you are using but as I google it in
> http://code.google.com/p/wps-grass-bridge/source/browse/trunk/ZOOGrassModuleStarter.py?r=9&spec=svn9
> it looks something wrong with the path in configure file
> >
> > Quang
> >
> > On Sunday, May 3, 2015 9:13 PM, pablo zader <pzader at gmail.com> wrote:
> >
> >
> > Hello Quang
> >
> > If I change the directory owner to www-data, it works well. But it also
> works if you have the permissions to 777 with user root.
> > For example
> >
> > drwxrwxrwx  31 root root 12288 may  3 16:10 tmp
> > drwxrwxrwx 2 root     root        4096 may  3 16:07 /tmp/zoo
> >
> > But my question is another:
> >
> > "There are two issues I want to raise:
> >       • best would return an error message: "Can not create the
> directory", rather than "ZOOGrassModuleStarter instance has no attribute
> 'logfile"??? (This is bug zoo-proyect??)
> >
> >       • If my tmp is:
> >
> > drwxrwxrwx  30 root root 12288 may  3 00:43 tmp
> >
> > Why zoo-project can not create the directory zoo? "
> >
> > Thanks
> >
> >
> >
> >
> >
> > 2015-05-03 15:35 GMT-03:00 truongxuan quang <truongxuanquang at yahoo.com>:
> > Hello Pablo
> >
> > Can you please change / tmp/zoo to www-data permission
> > Quang
> >
> >
> >
> > On Sunday, May 3, 2015 5:54 AM, pablo zader <pzader at gmail.com> wrote:
> >
> >
> > Hi list
> >
> > I'm working with GRASS GIS services, particularly "r.what".
> > Experiment a problem to define a nonexistent directory in GlobalGras
> Settings.py file:
> >
> > WORKDIR="/tmp/zoo"
> > OUTPUTDIR="/tmp/zoo"
> > LOGFILE="/tmp/zoo/logfile.txt"
> > LOGFILE_MODULE_STDOUT="/tmp/zoo/logfile_module_stdout.txt"
> > LOGFILE_MODULE_STDERR="/tmp/zoo/logfile_module_sterr.txt"
> > GRASS_GIS_BASE="/home/pablo/grass_trunk/dist.x86_64-unknown-linux-gnu"
> >
> GRASS_ADDON_PATH="/home/pablo/wps-grass-bridge/gms/Testing/Python/GrassAddons"
> > GRASS_VERSION="7.0.svn"
> >
> > if the "/ tmp/zoo" directory does not exist, an error occurs:
> >
> > <ExceptionReport xmlns="http://www.opengis.net/ows/1.1" xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="
> http://www.opengis.net/ows/1.1
> http://schemas.opengis.net/ows/1.1.0/owsExceptionReport.xsd"
> xml:lang="en-US" version="1.1.0">
> > <Exception exceptionCode="NoApplicableCode">
> > <ExceptionText>
> > TRACE : ZOOGrassModuleStarter instance has no attribute 'logfile' <type
> 'exceptions.AttributeError'> Unable to run your python process properly.
> Please check the following messages : [' File "/usr/lib/cgi-bin/r_what.py",
> line 7, in r_what\n service.fromMaps("r.what", inputs, outputs)\n', ' File
> "/usr/lib/cgi-bin/ZOOGrassModuleStarter.py", line 43, in fromMaps\n
> self._createTemporalDir(GlobalGrassSettings.WORKDIR)\n', ' File
> "/usr/lib/cgi-bin/gms/GrassModuleStarter.py", line 248, in
> _createTemporalDir\n self.LogError(log)\n', ' File
> "/usr/lib/cgi-bin/gms/ProcessLogging.py", line 70, in LogError\n
> self.logfile.write("\\n<ERROR timestamp=\\"" + localtime + "\\">\\n")\n']
> > </ExceptionText>
> > </Exception>
> > </ExceptionReport>
> >
> > There are two issues I want to raise:
> >       • best would return an error message: "Can not create the
> directory", rather than "ZOOGrassModuleStarter instance has no attribute
> 'logfile"??? (This is bug zoo-proyect??)
> >
> >       • If my tmp is:
> >
> > drwxrwxrwx  30 root root 12288 may  3 00:43 tmp
> >
> > Why zoo-project can not create the directory zoo?
> >
> > Thanks in advanced
> >
> > Pablo
> >
> >
> >
> >
> >
> >
> > --
> > 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 "
> >
> > _______________________________________________
> > Zoo-discuss mailing list
> > Zoo-discuss at lists.osgeo.org
> > http://lists.osgeo.org/cgi-bin/mailman/listinfo/zoo-discuss
> >
> >
> >
> >
> > --
> > 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 "
> >
> >
> >
> >
> >
> > --
> > 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 "
> > _______________________________________________
> > Zoo-discuss mailing list
> > Zoo-discuss at lists.osgeo.org
> > http://lists.osgeo.org/cgi-bin/mailman/listinfo/zoo-discuss
>
>
>
> Gérald Fenoy
> http://wiki.osgeo.org/wiki/User:Djay
>
>


-- 
*Pablo J. Zader*
*Lic. en Cs. de la Computación*
*pablo.zader at gmail.com <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 "*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/zoo-discuss/attachments/20150504/bd43a73a/attachment.html>


More information about the Zoo-discuss mailing list