Skip to main content
Question

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

  • November 13, 2023
  • 2 replies
  • 201 views

nepalikiwi
Contributor
Forum|alt.badge.img+4

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,

2 replies

hkingsbury
Celebrity
Forum|alt.badge.img+73
  • 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

desiree_at_safe
Safer
Forum|alt.badge.img+24

Glad to update the community that this issue should now been resolved in Esri ArcGIS Connector package (safe.esri-agol) version 3.26.0 and newer

How to get the fix:

  • Download the newest version (now v3.26.1) from FME Hub: Esri ArcGIS Connector v3.26.1 (Compatible with FME 2024.0 Build 24187 and newer)
    OR

  • Upgrade within FME Form: You can update the package directly within FME Workbench via FME Options > FME Packages (or by adding the updated reader to your canvas).

For step-by-step instructions on updating packages, see Introduction to FME Packages> Upgrading FME Packages article

Please let us know if you run into any further issues after upgrading! 🙂

[Internal ref: FMEENGINE-99412]