[Pywps-devel] Pywps-devel Digest, Vol 50, Issue 4
Jorge de Jesus
jmdj at pml.ac.uk
Thu Jan 27 10:13:35 CET 2011
Hi Diego
I saw your latests email but I will reply from this one.
- I am not so fun of SetEnv PYWPS_PROCESSES
/home/sauron/dev/python/wps-processes it is better for all environ
variable to be set in PyWPS's wrapper script, sometimes we can have
nasty surprises. Check:
http://wiki.rsg.pml.ac.uk/pywps/index.php/Instance
- You have a problem with python paths and configurations, you can check
what is going on by running the following script as apache CGI, and then
compare it with your bash settings, but you have solved it already :)
http://pastebin.com/L363vR0V
You can remove the html structure from the script and run it on the bash
- Concerning the .endwith( ), you seem to have an old pywps
implementation, and it may be a problem with your HOME env setting give
a look at this PyWPS email
http://lists.wald.intevation.org/pipermail/pywps-devel/2009-October/000705.html
Nevertheless could you post the pywps.log with the backtrace to see
where the problem is
Jorge
On 26/01/11 20:11, diego fernando castillo osorio wrote:
> Hi Jorge
>
> this is my virtualhost configuration
> /etc/apache2/sites-enabled/000-default
>
> <VirtualHost *:80>
> ServerAdmin webmaster at localhost
>
> DocumentRoot /var/www
> <Directory />
> Options FollowSymLinks
> AllowOverride None
> </Directory>
> <Directory /var/www/>
> Options Indexes FollowSymLinks MultiViews
> AllowOverride None
> Order allow,deny
> allow from all
> </Directory>
>
> ErrorLog /var/log/apache2/error.log
>
> # Possible values include: debug, info, notice, warn, error, crit,
> # alert, emerg.
> LogLevel warn
>
> CustomLog /var/log/apache2/access.log combined
>
> Alias /doc/ "/usr/share/doc/"
> <Directory "/usr/share/doc/">
> Options Indexes MultiViews FollowSymLinks
> AllowOverride None
> Order deny,allow
> Deny from all
> Allow from 127.0.0.0/255.0.0.0 ::1/128
> </Directory>
>
> #############pywps#############
> ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
> <Directory "/usr/lib/cgi-bin/">
> #Next two lines added by Tim for PyWPS
> SetEnv PYWPS_CFG /etc/pywps.cfg
> SetEnv PYWPS_PROCESSES /home/sauron/dev/python/wps-processes
> #PythonPath "['/home/sauron/dev/python/',
> # '/home/sauron/dev/python/wps-processes']
> # + sys.path"
> AllowOverride None
> Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
> #changed from above for pywps
> Options +ExecCGI -MultiViews +FollowSymLinks
> Order allow,deny
> Allow from all
> </Directory>
> #Alias and dir below added for pywps
> Alias /wps_outputs/ "/tmp/wps_outputs"
> <Directory "/tmp/wps_outputs">
>
> Options Indexes MultiViews FollowSymLinks
> AllowOverride None
> </Directory>
> ##############################
>
> </VirtualHost>
>
> and change the permissions of the folders on PYTHONPATH with chmod
> 777, and still goes out the same error, dont know what else to look or
> who may be lacking, thanks.
>
> Diego Fernando Castillo Osorio
>
>
>
>
> > From: pywps-devel-request at wald.intevation.org
> > Subject: Pywps-devel Digest, Vol 50, Issue 4
> > To: pywps-devel at wald.intevation.org
> > Date: Wed, 26 Jan 2011 09:45:12 +0100
> >
> > Send Pywps-devel mailing list submissions to
> > pywps-devel at wald.intevation.org
> >
> > To subscribe or unsubscribe via the World Wide Web, visit
> > http://lists.wald.intevation.org/mailman/listinfo/pywps-devel
> > or, via email, send a message with subject or body 'help' to
> > pywps-devel-request at wald.intevation.org
> >
> > You can reach the person managing the list at
> > pywps-devel-owner at wald.intevation.org
> >
> > When replying, please edit your Subject line so it is more specific
> > than "Re: Contents of Pywps-devel digest..."
> >
> >
> > Today's Topics:
> >
> > 1. help Could not import process [script]: No module named
> > grass.script (diego fernando castillo osorio)
> > 2. Re: help Could not import process [script]: No module named
> > grass.script (Jorge de Jesus)
> >
> >
> > ----------------------------------------------------------------------
> >
> > Message: 1
> > Date: Tue, 25 Jan 2011 23:06:48 -0500
> > From: diego fernando castillo osorio <okiro7 at hotmail.com>
> > Subject: [Pywps-devel] help Could not import process [script]: No
> > module named grass.script
> > To: <pywps-devel at wald.intevation.org>
> > Message-ID: <SNT108-W331EC82772C27D8E82C8A588FF0 at phx.gbl>
> > Content-Type: text/plain; charset="utf-8"
> >
> >
> > Hi, I'm
> > pond in a project for
> > college and I need to
> > configure PYWPS Grass and
> > followed the manual configuration
> > of this page and me is
> > getting the following error in
> > the browser:
> >
> > <ExceptionReport version="1.0.0">
> > ?
> > <Exception exceptionCode="NoApplicableCode">
> > ?
> > <ExceptionText>
> >
> > Could not import process [script]: No module named grass.script
> >
> > </ExceptionText>
> > </Exception>
> > </ExceptionReport
> >
> >
> > in the LOG that I
> > have configured in the
> > pywps.cfg I get the following:
> >
> > Traceback (most recent call last):
> > File "/usr/lib/cgi-bin/wps.py", line 248, in <module>
> > wps = WPS()
> > File "/usr/lib/cgi-bin/wps.py", line 143, in __init__
> > self.performRequest()
> > File "/usr/lib/cgi-bin/wps.py", line 215, in performRequest
> > self.request = Execute(self)
> > File "/usr/local/lib/python2.6/dist-packages/pywps/Wps/Execute.py",
> line 136, in __init__
> > self.initProcess()
> > File "/usr/local/lib/python2.6/dist-packages/pywps/Wps/Execute.py",
> line 312, in initProcess
> > (self.wps.inputs["identifier"], e))
> > pywps.Exceptions.NoApplicableCodePyWPS NoApplicableCode: None
> >
> >
> >
> > not bad I know I have revised
> > several times but finding
> > the configuration error.
> >
> >
> > if I run from the console
> > if I get python script.py
> > correctly.
> >
> > I think the
> > error may be permissions on
> > a folder,
> >
> > I hope I
> > can help, thank you very much.
> >
> >
> > Diego Fernando Castillo Osorio
> >
> >
> > -------------- next part --------------
> > An HTML attachment was scrubbed...
> > URL:
> http://lists.wald.intevation.org/pipermail/pywps-devel/attachments/20110125/777ee9bb/attachment-0001.html
> >
> > ------------------------------
> >
> > Message: 2
> > Date: Wed, 26 Jan 2011 08:45:16 +0000
> > From: "Jorge de Jesus" <jmdj at pml.ac.uk>
> > Subject: Re: [Pywps-devel] help Could not import process [script]: No
> > module named grass.script
> > To: <pywps-devel at wald.intevation.org>
> > Message-ID: <4D3FDF1C.2030601 at pml.ac.uk>
> > Content-Type: text/plain; charset="utf-8"
> >
> > Hi Diego
> >
> >
> > Do you manage to get pyWPS working, in the console or just the process
> > script ?! I think that you are correct and your problem is related to
> > permissions, remember that in the console you run things as
> > <user>:<usergroup> while calling from the server you run things as
> > apache:apache
> >
> > Python, can't load the grass module due to permission or some pythonpath
> > problem/permission
> >
> > Jorge
> >
> > On 26/01/11 04:06, diego fernando castillo osorio wrote:
> > > Hi, I'm pond in a project for college and I need to configure PYWPS
> > > Grass and followed the manual configuration of this page and me is
> > > getting the following error in the browser:
> > >
> > > <ExceptionReport version="1.0.0">
> > > ?
> > > <Exception exceptionCode="NoApplicableCode">
> > > ?
> > > <ExceptionText>
> > >
> > > Could not import process [script]: No module named
> > > grass.script
> > >
> > > </ExceptionText>
> > > </Exception>
> > > </ExceptionReport
> > >
> > > in the LOG that I have configured in the pywps.cfg I get the
> following:
> > >
> > > Traceback (most recent call last):
> > > File "/usr/lib/cgi-bin/wps.py", line 248, in <module>
> > > wps = WPS()
> > > File "/usr/lib/cgi-bin/wps.py", line 143, in __init__
> > > self.performRequest()
> > > File "/usr/lib/cgi-bin/wps.py", line 215, in performRequest
> > > self.request = Execute(self)
> > > File "/usr/local/lib/python2.6/dist-packages/pywps/Wps/Execute.py",
> > > line 136, in __init__
> > > self.initProcess()
> > > File "/usr/local/lib/python2.6/dist-packages/pywps/Wps/Execute.py",
> > > line 312, in initProcess
> > > (self.wps.inputs["identifier"], e))
> > > pywps.Exceptions.NoApplicableCodePyWPS NoApplicableCode: None
> > >
> > >
> > > not bad I know I have revised several times but finding the
> > > configuration error.
> > >
> > > if I run from the console if I get python script.py correctly.
> > >
> > > I think the error may be permissions on a folder,
> > >
> > > I hope I can help, thank you very much.
> > >
> > > Diego Fernando Castillo Osorio
> > >
> > >
> > >
> > > _______________________________________________
> > > Pywps-devel mailing list
> > > Pywps-devel at wald.intevation.org
> > > http://lists.wald.intevation.org/mailman/listinfo/pywps-devel
> >
> >
> >
> --------------------------------------------------------------------------------
> > Plymouth Marine Laboratory
> >
> > Registered Office:
> > Prospect Place
> > The Hoe
> > Plymouth PL1 3DH
> >
> > Website: www.pml.ac.uk
> > Registered Charity No. 1091222
> > PML is a company limited by guarantee
> > registered in England & Wales
> > company number 4178503
> >
> >
> --------------------------------------------------------------------------------
> > This e-mail, its content and any file attachments are confidential.
> >
> > If you have received this e-mail in error please do not copy,
> disclose it to any third party or use the contents or attachments in
> any way. Please notify the sender by replying to this e-mail or e-mail
> forinfo at pml.ac.uk and then delete the email without making any copies
> or using it in any other way.
> >
> > The content of this message may contain personal views which are not
> the views of Plymouth Marine Laboratory unless specifically stated.
> >
> > You are reminded that e-mail communications are not secure and may
> contain viruses. Plymouth Marine Laboratory accepts no liability for
> any loss or damage which may be caused by viruses.
> >
> --------------------------------------------------------------------------------
> > -------------- next part --------------
> > An HTML attachment was scrubbed...
> > URL:
> http://lists.wald.intevation.org/pipermail/pywps-devel/attachments/20110126/9d374017/attachment.htm
> >
> > ------------------------------
> >
> > _______________________________________________
> > Pywps-devel mailing list
> > Pywps-devel at wald.intevation.org
> > http://lists.wald.intevation.org/mailman/listinfo/pywps-devel
> >
> >
> > End of Pywps-devel Digest, Vol 50, Issue 4
> > ******************************************
>
>
> _______________________________________________
> Pywps-devel mailing list
> Pywps-devel at wald.intevation.org
> http://lists.wald.intevation.org/mailman/listinfo/pywps-devel
--------------------------------------------------------------------------------
Plymouth Marine Laboratory
Registered Office:
Prospect Place
The Hoe
Plymouth PL1 3DH
Website: www.pml.ac.uk
Registered Charity No. 1091222
PML is a company limited by guarantee
registered in England & Wales
company number 4178503
--------------------------------------------------------------------------------
This e-mail, its content and any file attachments are confidential.
If you have received this e-mail in error please do not copy, disclose it to any third party or use the contents or attachments in any way. Please notify the sender by replying to this e-mail or e-mail forinfo at pml.ac.uk and then delete the email without making any copies or using it in any other way.
The content of this message may contain personal views which are not the views of Plymouth Marine Laboratory unless specifically stated.
You are reminded that e-mail communications are not secure and may contain viruses. Plymouth Marine Laboratory accepts no liability for any loss or damage which may be caused by viruses.
--------------------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wald.intevation.org/pipermail/pywps-devel/attachments/20110127/60b35edf/attachment-0001.html
More information about the Pywps-devel
mailing list