Skip to main content

Hi,

For some time, I used the following approach to open a KML dataset (both in Desktop for development, and in Server for operational use, version 2020.1.0.1, both running on Windows (server) OS):

 

  • Create a public parameter "INPUT_FOLDER"
  • Create a public parameter "INPUT_FILE"
  • Add a KML Reader for a specific KMl file to the workbench, which defaults to a public parameter "SourceDataset_OGCKML"
  • Make this a private parameter, and change the definition to: "$(INPUT_FOLDER)\$(INPUT_FILE)"

 

I then use either UNC or local paths in the INPUT_FOLDER to point the reader to the correct location.

 

Last week, we started migrating to 2021.2.4, which I installed on my workstation (windows). For the sake of completeness I think I should mention we are targeting an FME server running in a docker container on a linux host.

 

This approach stopped working, with the message :

2022-03-19 14:58:52|   0.8|  0.0|INFORM|Loaded module 'OGCKML' from file 'C:\Program Files\FME\2020.1.0.1\plugins/KML21.dll'
2022-03-19 14:58:52|   0.8|  0.0|INFORM|FME API version of module 'OGCKML' matches current internal version (3.8 20200115)
2022-03-19 14:58:52|   0.8|  0.0|FATAL |KML: Cannot open dataset `C:\TestData\kml\msg_kml_samples\Bunker Ports.kml'
2022-03-19 14:58:52|   0.8|  0.0|FATAL |KML: Error initializing reader

Oddly enough, this error happens on both the window FME Server and with Desktop.

Even more confusing is the fact that when I download the workbench from the FME server, it does run when I do this for the first time, it fails running it a second time (see attached logfiles).

I have tried to add a new KML reader to the workbench. When I use a specific file, this works. When I apply the approach outlined above and point it to the existing private parameter, it fails again.

 

I do not understand what is going wrong, and I'm running out of options to try. Can anyone please assist me here?

 

 

 

I have determined what caused this behavior. By some obscure reason, I managed to create a kml file that started with a space (" Bunker Ports.kml"). Somewhere in the process of determining the full path of the file, this space was dropped. This caused the KML reader to fail.

 

Easily overlooked thing, spoiled a large part of my weeekend.

 

For those who are interested: windows won't let you rename files that result in a name with a leading space. However, it is possible to:

  • add a few files to a zip file,
  • rename an entry in the zip file (using e.g. 7zip) to add the leading space
  • extract the archive

Reply