Solved

_http_error (string: UTF-8): ImageFetcher: The HTTP response did not include a Content-Type header, so the image type cannot be detected ?


Badge

Hello, I have a problem with the ImageFetcher transformer.

I'm trying to create images from a WMS link. The error is : _http_error (string: UTF-8): ImageFetcher: The HTTP response did not include a Content-Type header, so the image type cannot be detected.

 

I've tested the WMS link on Firefox, Edge and even on Internet Explorer and its working properly without any error.

 

Thank you in advance for your help.

icon

Best answer by kailinatsafe 17 June 2022, 14:38

View original

13 replies

Userlevel 3
Badge +13

Hello @mi​ , would you be able to share how your workspace and ImageFetcher transformer parameters are set up currently? Also, if you're able to share sample WMS! Happy to help, Kailin

Badge

Hello Kailin,

Thank you for your answer.

 

WMS sample:

https://geo.jura.ch/mapserv_proxy?ogcserver=Main_PNG&STYLES=default&LAYERS=A16_jonctions&SERVICE=WMS&FORMAT=image%2Fpng&REQUEST=GetMap&CRS=EPSG%3A2056&HEIGHT=480&WIDTH=700&VERSION=1.3.0&BBOX=2550000%2C1220000%2C2610000%2C1263000&TRANSPARENT=true&FORMAT=image%2Fpng

 

ImageFetcher parameters:

image

Userlevel 3
Badge +13

Hello @mi​ , thanks! According to the URL, it looks like your GetMap is PNG. Would you mind trying to use 'PNG' as Image Type:

 

ImageFetcher 

Let me know if you still get the error after trying this! Best, Kailin.

Badge

Hello @mi​ , thanks! According to the URL, it looks like your GetMap is PNG. Would you mind trying to use 'PNG' as Image Type:

 

ImageFetcher 

Let me know if you still get the error after trying this! Best, Kailin.

OMG it was so obvious, I didn't see it. The thing is that it was working properly before the latest FME updates.

Anyway, no more error. Thank you very much for your help.

Best Regards,

Marc

Userlevel 3
Badge +13

Hello @mi​ , thanks! According to the URL, it looks like your GetMap is PNG. Would you mind trying to use 'PNG' as Image Type:

 

ImageFetcher 

Let me know if you still get the error after trying this! Best, Kailin.

@mi​ , what version/build was this working in prior to upgrading to the latest FME? I tried in FME 2021.2, 2019.1 and 2022.1 (beta) and the same results occur. If I can reproduce, I think it'd be worth bringing up to development.

 

I find it slightly odd that FME is unable to automatically detect the content type header, as I can see it in the log:

 

ImageFetcher_ContentType_Log 

Hopefully you can find the older version it was working in. Until then, Kailin.

Badge

Hello Kailin

Thank you for your answer. For this script we are using the FME 2021.2.5 version.

I've contacted our IT department and they told me that we had our proxy changed arround the same time. So maybe this was the main reason of this error.

Badge

@kailinatsafe​ 

Hi I am having a similar issue with the ImageFetcher when trying to follow Automating Workflows from Survey123 to ArcGIS using FME Server. I am at the point where I am trying to read the Image from the Survey123 through ArcGIS Online.

 

ImageFetcher: An image type could not be detected. The Content-Type header value was 'text/html; charset=utf-8'

I am on version 2021.1.3

Your help is appreciated.

 

Thanks,

Rebecca

Userlevel 3
Badge +13

@kailinatsafe​ 

Hi I am having a similar issue with the ImageFetcher when trying to follow Automating Workflows from Survey123 to ArcGIS using FME Server. I am at the point where I am trying to read the Image from the Survey123 through ArcGIS Online.

 

ImageFetcher: An image type could not be detected. The Content-Type header value was 'text/html; charset=utf-8'

I am on version 2021.1.3

Your help is appreciated.

 

Thanks,

Rebecca

Hello @Rebecca Segura​ , thanks for posting! I took a look at the tutorial. Oddly enough, the ImageFetcher works as expected in 2022.0, so upgrading to the latest official build can be used to workaround this. You can find this on our Downloads Page.

 

When I try running the same workspace in 2021.2 (I didn't have your exact version installed) I recieve the error. I'll take a closer look at whats going on and get back to you. In the meantime, would you mind sharing a screenshot with your ImageFetcher parameters?

 

Furthermore, if you're using FME Server, this is something to keep in mind. If you navigate to the bottom of the 'Automating Workflow' article, there is a note regarding the ImageFetcher, however I don't think this is the issue, but: "Also, if you receive an error from the ImageFetcher when your automation runs, for example ‘An image type could not be detected’, it may be an authentication issue due to an out-of-date ArcGIS Online Web Server on your FME Server. Please see this article for more information: Known Issue: Unable to Authenticate to ArcGIS Online on FME Server."

 

Best, Kailin.

Userlevel 3
Badge +13

Hello Kailin

Thank you for your answer. For this script we are using the FME 2021.2.5 version.

I've contacted our IT department and they told me that we had our proxy changed arround the same time. So maybe this was the main reason of this error.

Hello @mi​ , thank you so much! FMEENGINE-73965. Will update the thread when this is resolved :)

Badge

Hello @Rebecca Segura​ , thanks for posting! I took a look at the tutorial. Oddly enough, the ImageFetcher works as expected in 2022.0, so upgrading to the latest official build can be used to workaround this. You can find this on our Downloads Page.

 

When I try running the same workspace in 2021.2 (I didn't have your exact version installed) I recieve the error. I'll take a closer look at whats going on and get back to you. In the meantime, would you mind sharing a screenshot with your ImageFetcher parameters?

 

Furthermore, if you're using FME Server, this is something to keep in mind. If you navigate to the bottom of the 'Automating Workflow' article, there is a note regarding the ImageFetcher, however I don't think this is the issue, but: "Also, if you receive an error from the ImageFetcher when your automation runs, for example ‘An image type could not be detected’, it may be an authentication issue due to an out-of-date ArcGIS Online Web Server on your FME Server. Please see this article for more information: Known Issue: Unable to Authenticate to ArcGIS Online on FME Server."

 

Best, Kailin.

ImageFetcher

Userlevel 3
Badge +13

Hello @Rebecca Segura​ , thanks for posting! I took a look at the tutorial. Oddly enough, the ImageFetcher works as expected in 2022.0, so upgrading to the latest official build can be used to workaround this. You can find this on our Downloads Page.

 

When I try running the same workspace in 2021.2 (I didn't have your exact version installed) I recieve the error. I'll take a closer look at whats going on and get back to you. In the meantime, would you mind sharing a screenshot with your ImageFetcher parameters?

 

Furthermore, if you're using FME Server, this is something to keep in mind. If you navigate to the bottom of the 'Automating Workflow' article, there is a note regarding the ImageFetcher, however I don't think this is the issue, but: "Also, if you receive an error from the ImageFetcher when your automation runs, for example ‘An image type could not be detected’, it may be an authentication issue due to an out-of-date ArcGIS Online Web Server on your FME Server. Please see this article for more information: Known Issue: Unable to Authenticate to ArcGIS Online on FME Server."

 

Best, Kailin.

Hello @Rebecca Segura​ , thanks for sharing! Unfortunately, it looks like we changed something in regards to how we're making HTTPCalls since 2021.2. When I run this workspace in FME 2022.0, it can properly detect the image/content type as has value `image/jpeg', but in FME 2021.2 we recieve`text/html; charset=utf-8'. I think upgrading to the latest official build is your best option here! Sorry I don't have better news!

 

There is another workaround I can offer, although I have not been able to apply it to that article dataset. If we use the above WMS with a GET request in the HTTPCaller, with <Auto-Detect from HTTP Headers> set as 'Response Body Encoding', it will return a _response_body that we can feed into a RasterReplacer transformer. It would look something like this:

 

ImageFetcherWorkaroundAgain, I have not been able to get this to work for the article workspace, but hopefully this can help down the road. Best, Kailin

Badge

Hello @Rebecca Segura​ , thanks for posting! I took a look at the tutorial. Oddly enough, the ImageFetcher works as expected in 2022.0, so upgrading to the latest official build can be used to workaround this. You can find this on our Downloads Page.

 

When I try running the same workspace in 2021.2 (I didn't have your exact version installed) I recieve the error. I'll take a closer look at whats going on and get back to you. In the meantime, would you mind sharing a screenshot with your ImageFetcher parameters?

 

Furthermore, if you're using FME Server, this is something to keep in mind. If you navigate to the bottom of the 'Automating Workflow' article, there is a note regarding the ImageFetcher, however I don't think this is the issue, but: "Also, if you receive an error from the ImageFetcher when your automation runs, for example ‘An image type could not be detected’, it may be an authentication issue due to an out-of-date ArcGIS Online Web Server on your FME Server. Please see this article for more information: Known Issue: Unable to Authenticate to ArcGIS Online on FME Server."

 

Best, Kailin.

@kailinatsafe​ We found a solution! We realized the token was not being added to the end of the attachment url. We had to add the ArcGISOnlineTokenGetter instead of the creator in order to generate a token. Our ImageURL input in the ImageFetcher looked like this: @Value(attachment_url)?token=@Value(token)

 

Thanks for looking into this!

Rebecca

Userlevel 3
Badge +13

Hello @Rebecca Segura​ , thanks for posting! I took a look at the tutorial. Oddly enough, the ImageFetcher works as expected in 2022.0, so upgrading to the latest official build can be used to workaround this. You can find this on our Downloads Page.

 

When I try running the same workspace in 2021.2 (I didn't have your exact version installed) I recieve the error. I'll take a closer look at whats going on and get back to you. In the meantime, would you mind sharing a screenshot with your ImageFetcher parameters?

 

Furthermore, if you're using FME Server, this is something to keep in mind. If you navigate to the bottom of the 'Automating Workflow' article, there is a note regarding the ImageFetcher, however I don't think this is the issue, but: "Also, if you receive an error from the ImageFetcher when your automation runs, for example ‘An image type could not be detected’, it may be an authentication issue due to an out-of-date ArcGIS Online Web Server on your FME Server. Please see this article for more information: Known Issue: Unable to Authenticate to ArcGIS Online on FME Server."

 

Best, Kailin.

@Rebecca Segura​ , ahhh! thank you for updating me! So happy you got it working now. Best, Kailin.

Reply