OWSLib icon indicating copy to clipboard operation
OWSLib copied to clipboard

WFS- xml to object conversion is None, with valid url

Open hblGP opened this issue 3 years ago • 1 comments

I am having a very similar issue as in #636 but with WebFeatureService() instead: owslib\feature\wfs100.py I get the same error because a tag with the name 'Service' was not found on line 152 and it is sending None to method 'ServiceIdentification' line 153, which does not have the method 'find ()' since it is a None.

The URL i'm using is: https://services.datafordeler.dk/FIKSPUNKT/FIKSPUNKTER_HIST_GML3SFP/1.0.0/WFS?username=KLHOXFAHAD&password=-7-nvuVaajAWGhS

The Username/password has specifically been created for the purpose of finding a solution for this problem.

To reproduce:

from owslib.wfs import WebFeatureService
url = "https://services.datafordeler.dk/FIKSPUNKT/FIKSPUNKTER_HIST_GML3SFP/1.0.0/WFS?username=KLHOXFAHAD&password=-7-nvuVaajAWGhS"
wfs = WebFeatureService(url=url)

Error: image

hblGP avatar Aug 02 '21 08:08 hblGP

I may have found the issue, I didn't add the WFS version, so I tried to use it with version 2.0.0 and then things seemed to work. The website states it is version 1.0.0. So that seems a little strange though. To reproduce:

from owslib.wfs import WebFeatureService
url = "https://services.datafordeler.dk/FIKSPUNKT/FIKSPUNKTER_HIST_GML3SFP/1.0.0/WFS?username=KLHOXFAHAD&password=-7-nvuVaajAWGhS"
wfs = WebFeatureService(url=url, version='2.0.0')

hblGP avatar Aug 02 '21 08:08 hblGP