Hi Jorge,

hmm, trying it with a mapserver wfs it works (more or less, Mapserver
complaining about the optional propertyname parameter, but thats a
know issue). Also urlencode in wfs100 should concatenate the request
parameters with a "&". Don't think this & is necessary unless there's
a strange value in your getfeature URL... ah yes, your getFeature URL
already reads: {'url':
'http://rsg.pml.ac.uk:80/geoserver/wfs?request=GetFeature'}, so that's
why.

There is already the openUrl function in util.py that would check for
that, just needs to be used at this place.

Cheers, Michael




2011/6/14 Jorge de Jesus <[email protected]>:
>  Hi to all
>
> I've installed OWSLib for the first time and tried to fetch a WFS
> content and got the following error:
>
>>>> from owslib.wfs import WebFeatureService
>>>> wfs=WebFeatureService("http://rsg.pml.ac.uk/geoserver/wfs";)
>>>> wfs.getfeature(typename=["rsg:bathy_100m"])
> Traceback (most recent call last):
>  File "<stdin>", line 1, in <module>
>  File
> "/usr/lib/python2.6/site-packages/OWSLib-0.3.2beta-py2.6.egg/owslib/feature/wfs100.py",
> line 206, in getfeature
>    raise ServiceException, str(se.text).strip()
> owslib.feature.wfs100.ServiceException: No such operation WFS 1.0.0
> GetFeaturetypename=rsg:bathy_100m
>
> I've found in google that someone has already bumped into something
> similar, but no solution.
>
> It seems that wfs100.py is doing an incorrect URL, I've managed to trace
> everything till here:
>
>  if method == 'Post':
>            u = urlopen(base_url, data=data)
>        else:
>            u = urlopen(base_url +data)
>
> The problem is in line 188, with urlopen(base_url+data), the
> concatenation is missing a "&"
>
> I've added the following:
> u = urlopen(base_url +"&"+data)
>
> and everything seems to work. But I am not familiar with the OWSLib
> code, so I've no idea if what I've done is correct or not
>
> Could some of the developers give it a look?!
>
> Thanks
>
> Jorge
>
> --------------------------------------------------------------------------------
> Plymouth Marine Laboratory
>
> Registered Office:
> Prospect Place
> The Hoe
> Plymouth  PL1 3DH
>
> Website: www.pml.ac.uk
> Click here for PML Annual Review 2010
> Registered Charity No. 1091222
> PML is a company limited by guarantee
> registered in England & Wales
> company number 4178503
>
> Please think before you print
>
> --------------------------------------------------------------------------------
> 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 [email protected] 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.
> --------------------------------------------------------------------------------
> _______________________________________________
> Community mailing list
> [email protected]
> http://lists.gispython.org/mailman/listinfo/community
>



-- 
-----------------------------------------------------------
Michael Schulz

Christoph-Mang-Str. 5
D-79100 Freiburg
_______________________________________________
Community mailing list
[email protected]
http://lists.gispython.org/mailman/listinfo/community

Reply via email to