Closed bchartier closed 4 months ago
@landryb : il me semble que le problème que tu soulignes au début de ce message https://github.com/georchestra/sdi-consistence-check/discussions/80#discussioncomment-9985900 est similaire à ce ticket. A confirmer et voir avec @bchartier les pistes de résolution envisagées/envisageables.
oui ca semble être la même erreur, merci! c'est probablement une question de version python sur les types de str..
using python 3.11.2 & owslib 0.27.2 from debian 12, the following diff fixes it for me, although i have no idea if it's correct:
diff --git a/sdi-consistence-check/geometadata.py b/sdi-consistence-check/geometadata.py
index b2bcd8c..e4907d7 100644
--- a/sdi-consistence-check/geometadata.py
+++ b/sdi-consistence-check/geometadata.py
@@ -1,5 +1,4 @@
-import xml.etree.ElementTree as etree
-
+from owslib.etree import etree
from owslib.iso import MD_Metadata
from owslib.util import openURL
from requests import HTTPError
it forces the use of the owslib version of etree, and python3 sdi-consistence-check/checker.py --mode WMS --server https://ids.dev.craig.fr/wxs/wms
finds a lot of OK metadata links.
according to https://owslib.readthedocs.io/en/latest/usage.html#iso that's how it should be imported..
using python 3.11.2 & owslib 0.27.2 from debian 12, the following diff fixes it for me, although i have no idea if it's correct:
I'll try to test this as soon as possible. Thanks a lot @landryb
@landryb: the change you suggested seems to fix this issue. Thanks a lot.
When running SDI-CC on DatagrandEst WMS server a lot of errors of the following kind are raised:
In order to locate where these errors occur in the code I needed to modify SDI-CC code.
The traceback I get:
This seems to occur there: https://github.com/georchestra/sdi-consistence-check/blob/master/sdi-consistence-check/geometadata.py#L21
A small piece of code to reproduce this error:
I think the metadata files are correct. A small piece of code to demonstrate this:
I'm wondering if the error comes from OWSlib.