geopython / OWSLib

OWSLib is a Python package for client programming with Open Geospatial Consortium (OGC) web service (hence OWS) interface standards, and their related content models.
https://owslib.readthedocs.io
BSD 3-Clause "New" or "Revised" License
386 stars 275 forks source link

CSW requests Unicode error #202

Open tomkralidis opened 9 years ago

tomkralidis commented 9 years ago
from owslib.csw import CatalogueServiceWeb
from owslib.fes import PropertyIsEqualTo

csw = 'http://geoportal.gov.cz/php/micka/csw/index.php'
aopk_query = PropertyIsEqualTo('csw:MetadataContact', 'Agentura ochrany přírody a krajiny České republiky')
>>>> cenia.getrecords2([aopk_query])
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>   File "/usr/local/lib/python2.7/dist-packages/owslib/csw.py", line 341, in
> getrecords2
>     node2.append(flt.setConstraintList(constraints))
>   File "/usr/local/lib/python2.7/dist-packages/owslib/fes.py", line 143, in
> setConstraintList
>     return self.setConstraint(constraints[0])
>   File "/usr/local/lib/python2.7/dist-packages/owslib/fes.py", line 117, in
> setConstraint
>     self._root.append(constraint.toXML())
>   File "/usr/local/lib/python2.7/dist-packages/owslib/fes.py", line 264, in
> toXML
>     etree.SubElement(node0, util.nspath_eval('ogc:Literal',
> namespaces)).text = self.literal
>   File "lxml.etree.pyx", line 953, in lxml.etree._Element.text.__set__
> (src/lxml/lxml.etree.c:45142)
>   File "apihelpers.pxi", line 684, in lxml.etree._setNodeText
> (src/lxml/lxml.etree.c:20505)
>   File "apihelpers.pxi", line 1393, in lxml.etree._utf8
> (src/lxml/lxml.etree.c:26656)
> ValueError: All strings must be XML compatible: Unicode or ASCII, no NULL
> bytes or control characters
github-actions[bot] commented 2 weeks ago

This Issue has been inactive for 90 days. In order to manage maintenance burden, it will be automatically closed in 7 days.