Python API can't return layers and tables

525
2
03-08-2018 10:07 PM
simoxu
by MVP Regular Contributor
MVP Regular Contributor

It seems the Python API can't return layers and tables in a feature service if a proxy is used when instantiating the arcgis.GIS class.

If I don't use proxy in the arcgis.GIS class instantiation, it works OK. but we are required to use proxy to visit internet in our organisation....

Please see the screenshot in the attachment.

Is it only me or I hit a bug in the API?

0 Kudos
2 Replies
RohitSingh2
Esri Contributor

Can you try specifying just the hostname without http:// in the proxy_host parameter?

simoxu
by MVP Regular Contributor
MVP Regular Contributor

Hi Rohit,

If I use just the hostname of my corporate proxy, it works!

gis=GIS(url="http://abc.maps.arcgis.com",username="simoxu",proxy_host="xxx.xxx.abc.gov.au",proxy_port="8080")

I am happy my corporate proxy is working now, but my Cntlm proxy does not work with the API.  (there was a time my corporate proxy didn't work with my ArcREST python code, I had to set up a local proxy using cntlm  to relay the request to the corporate proxy. ) if I use cntlm proxy with ArcGIS API for Python,  I can't get the layers and tables. I am sure the cntlm is working.

gis=GIS(url="https://abc.maps.arcgis.com",username="XXXX",proxy_host="127.0.0.1",proxy_port="3218")

0 Kudos