I am using the python API in a Jupyter notebook on notebooks.esri.com and am observing that when adding a a map with one or more layers on it, the data is not showing up. I traced it back to the fact that the API is adding an extra layer id to the feature service requests when it sends in the queries. I.E. if my feature layer has a URL like "http://myhost/testing/MyData/FeatureServer/0", the query requests come to the feature service as "http://myhost/testing/MyData/FeatureServer/0/0/query?where=..."
Note the extra "0" in the URL. I have not seen any other Esri tools generate layer URLs like this and I don't see anything in the spec that says this should be supported. Any thoughts about what's going on?
You added the Feature Layer then as an item with the url "http://myhost/testing/MyData/FeatureServer/0" ?
Can you tell us a little bit more about how you are adding the layer? Are you adding that from your content (drag and drop) or via the script?
It does this when I use FeatureLayer(url) and then try to use the query() function as well as if I access a WebMap with my feature layers already configured.
It appears to related to the version of the arcgis Python API. If I downgrade to 1.4.0, it works fine.
Thanks for the additional info, James. So we're on the same page, can you provide a snippet I test on my end to see if I encounter the same behavior?