Skip to main content
Question

Error trying to connect ESRI mapservice with "Esri ArcGIS Feature Service" Reader.

  • November 13, 2023
  • 1 reply
  • 55 views

nepalikiwi
Contributor
Forum|alt.badge.img+1

Hi,

 

When i try to connect open service: https://gis4.waimatedc.govt.nz/arcgis/rest/services/Public/RoadClosure_Waimate_Active_Planned/MapServer using "Esri ArcGIS Feature Service" reader, I get Python exception error. There is no authentication required as its open service. The fact that I can use HTTPCaller and get the data with query service tells me, this service doesnt require authentication. Am I missing something? I tried few other rest service from this council with no luck. Python Exception <HTTPError>: 403 Client Error: Forbidden for url: does this error means anything to do their IT system infrastructure?

 

Any help would be appreciated?image 

Cheers,

1 reply

hkingsbury
Celebrity
Forum|alt.badge.img+54
  • Celebrity
  • November 13, 2023

Hey Subodh

 

It looks like Waimate have configure their infrastructure/environment to block any requests with a User-Agent header that contains 'python-request'.

 

When using the readers, the User-Agent passed is 'FME/2023.7.47.23636 python-requests/2.31.0' - it doesn't appear you can change this. However when using the HTTPCaller, you can set the user agent to whatever you want (by default it seems to be empty)

 

You can recreate this pretty easily in Postman. With the default user agent, the request works fine

image 

When you use the FME user agent, it failsimage 

and when you append 'python-request' to the default postman user agent, it also fails

image 

So it looks like your options are either:

  • Use an HTTPCaller instead of the reader, or
  • Contact Waimate and get clarification on why they're blocking that user agent

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