<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto">Hi Sophie: a fix has just been applied to master. We will have a bug fix release shortly. <div><br></div><div>Thanks</div><div><br></div><div>..Tom<br><br><div dir="ltr"><br><blockquote type="cite">On Nov 8, 2019, at 04:48, Sophie Herrmann <sophie.herrmann@eodc.eu> wrote:<br><br></blockquote></div><blockquote type="cite"><div dir="ltr">

<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">



<div style="font-family: Arial, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
Hi Tom!</div>
<div style="font-family: Arial, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Arial, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
Thanks for the Info, I somehow completely missed this issue.</div>
<div style="font-family: Arial, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Arial, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
I'm running python3.6 and postgresql with postgis extension.</div>
<div style="font-family: Arial, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Arial, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
Best,</div>
<div style="font-family: Arial, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
Sophie<br>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Tom Kralidis <tomkralidis@gmail.com><br>
<b>Sent:</b> Friday, November 8, 2019 1:30 AM<br>
<b>To:</b> Sophie Herrmann <sophie.herrmann@eodc.eu><br>
<b>Cc:</b> pycsw-devel@lists.osgeo.org <pycsw-devel@lists.osgeo.org><br>
<b>Subject:</b> Re: [pycsw-devel] Error requesting iso</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Hi Sophie: thanks for the info.  There's an issue at [1] which has a patch<br>
that seems to work.  What version of Python are you using and what is<br>
your database backend?  Feel free to chime in on the ticket as well if you<br>
wish.<br>
<br>
..Tom<br>
<br>
<br>
[1] <a href="https://github.com/geopython/pycsw/issues/576#issuecomment-494138478">
https://github.com/geopython/pycsw/issues/576#issuecomment-494138478</a><br>
<br>
On Tue, Oct 29, 2019 at 12:06 PM Sophie Herrmann<br>
<sophie.herrmann@eodc.eu> wrote:<br>
><br>
> Hello pycsw-team!<br>
><br>
> I just set up pycsw locally, inserted some xmls and tried to retrieve them again (using getRecordById) and I got an error when requesting
<a href="http://isotoc211.org/2005/gmd">http://isotoc211.org/2005/gmd</a> as outputSchema.<br>
><br>
> In more detail I get the following error:<br>
> ...<br>
>   File "some/path/to/pycsw/pycsw/plugins/profiles/apiso/apiso.py", line 389, in write_record<br>
>     if caps is None and xml_blob is not None and xml_blob.startswith(b'<gmd:MD_Metadata'):<br>
> TypeError: startswith first arg must be str or a tuple of str, not bytes<br>
><br>
> It seems that my xml_blob is of type string not bytes. I tried to understand where the object is coming from, and for what I see it's the unchanged<br>
> content of the xml  database column. I inserted xmls in iso format (see attachment) so I assume they are stored as they are in this database column.<br>
><br>
> Coming back to the types, the xml column is of type text, so it makes sense that xml_blob is of type string. Following this idea I tried to use<br>
> '<gmd:MD_Metadata' instead of b'<gmd:MD_Metadata'. This works for me, so I get the expected xml.<br>
><br>
> Do you understand why this is happening for me?<br>
><br>
> Maybe also important: I'm using postgresql with postgis extension as a database.<br>
><br>
> Thanks a lot for any help!<br>
> Best,<br>
> Sophie<br>
><br>
> _______________________________________________<br>
> pycsw-devel mailing list<br>
> pycsw-devel@lists.osgeo.org<br>
> <a href="https://lists.osgeo.org/mailman/listinfo/pycsw-devel">https://lists.osgeo.org/mailman/listinfo/pycsw-devel</a><br>
</div>
</span></font></div>


</div></blockquote></div></body></html>