Question

Why is this URL causing an error with FeatureReader?

  • 19 July 2022
  • 1 reply
  • 3 views

I am trying to read the following URL (https://eprostor.gov.si/ods/atom?id=1&type=data) with a FeatureReader transformer so that it will download the zip file and process the data within. This works fine with many other URLs I have used in this way (e.g. https://services.cuzk.cz/gml/inspire/ad/epsg-4258/583723.zip), but not for this one.

The error is:

XML Parser error: 'Error in input dataset: 'https://eprostor.gov.si/ods/atom?id=11&type=data' line: 1 column: 11 message: invalid byte '�' at position 1 of a 1-byte sequence'

 

I have attached an example workbench and associated csv containing a successful and failing URL in a list.

 

I'm wondering if anyone else has ever come across this issue, and/or if anyone has any ideas as to what is causing the problem, and if it can be resolved in some way.

 

The only thing I can think at the moment is the fact that the URL that is failing does not contain `.zip` at the end of the URL, or is maybe passing in some mis-information in the headers - there is a possibility I can feed this back to the providers if this is the case, but I would like to to understand better what the problem is before contacting them.

 

I have tried running this in both FME 2022.1 and 2021.2 - both had the same issue.

 

I should also say that if I download the zip file manually and then load it into FME, that works fine, so it isn't the zipfile itself that has unreadable data, but I don't want to have to go through that process as I need it to be more automated as there are several URLs to download, and this is only a subset of the process.

 

Thanks in advance,

Fiona

 

 


1 reply

Userlevel 1
Badge +12

Not sure if you need this now, but just came across your question. Its because the featurereader can't tell its a zip file from the link that is provided and therefore is probably trying to read in as xml/gml straight away. Not sure if you can get around that in the featurereader itself, but you sure can in FME.

 

Attached is an example of it working using a httpcaller and tempfile to save the zip to and then passing that to the featurereader

Reply