Skip to main content
Solved

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


Forum|alt.badge.img

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.

Best answer by kailinatsafe

mi wrote:

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.

View original
Did this help you find an answer to your question?

13 replies

kailinatsafe
Safer
Forum|alt.badge.img+21

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


Forum|alt.badge.img
  • Author
  • June 17, 2022

kailinatsafe
Safer
Forum|alt.badge.img+21
  • Safer
  • Best Answer
  • June 17, 2022
mi wrote:

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.


Forum|alt.badge.img
  • Author
  • June 17, 2022
kailinatsafe wrote:

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


kailinatsafe
Safer
Forum|alt.badge.img+21
kailinatsafe wrote:

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.


Forum|alt.badge.img
  • Author
  • June 20, 2022

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.


Forum|alt.badge.img
  • June 21, 2022

@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


kailinatsafe
Safer
Forum|alt.badge.img+21
reb wrote:

@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.


kailinatsafe
Safer
Forum|alt.badge.img+21
mi wrote:

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 :)


Forum|alt.badge.img
  • June 23, 2022
kailinatsafe wrote:

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


kailinatsafe
Safer
Forum|alt.badge.img+21
kailinatsafe wrote:

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


Forum|alt.badge.img
  • June 24, 2022
kailinatsafe wrote:

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


kailinatsafe
Safer
Forum|alt.badge.img+21
kailinatsafe wrote:

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings