Esri / arcgis-python-api

Documentation and samples for ArcGIS API for Python
https://developers.arcgis.com/python/
Apache License 2.0
1.87k stars 1.1k forks source link

Unable to preview map using gis.map() #203

Closed vhaisp closed 6 years ago

vhaisp commented 6 years ago

I am wondering if someone can help. I ran Jupyter either from Chrome or IE, it gave me error when i executed gis.map() . Below here is the simple script I ran:

from arcgis import GIS
from arcgis.gis import GIS
gis = GIS()
gis_servers = gis.admin.servers.list()
print(gis_servers)

I could view the result with no error after it prompted to input user and password and no issue to view the content. Then, ran below script to make sure that I could connect without issue and I got return with no error.

user1 = gis.users.get('arcgis1')
print (user1)
items = gis.content.search('test')
for item in items:
    display(item)

BUT got issue when I run: gis.map()

I checked on IE browser, the error is [object Object]{error_stack: Array[4], message: "", name: "Error"}

while I used Chrome browser, the error is

b {message: "Unable to load https://test.dev.com/portal/sharing/rest/generateToken status: 401", response: {…}, status: 401, responseText: "<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Stric…>
↵ </fieldset></div>
↵</div>
↵</body>
↵</html>
↵", xhr: XMLHttpRequest, …}

However, if I connected to arcgis online, I have no issue to run gis.map(). I can view the map. could someone give suggestion on what I should do or can do to solve the issue?

Thank you.

rohitgeo commented 6 years ago

@vhaisp you are connecting to ArcGIS Online with this : gis = GIS(). Do you see an error connecting to another ArcGIS Enterprise/ArcGIS Online org? Does anything show up in the JavaScript console?

rohitgeo commented 6 years ago

@vhaisp we have fixed issues with the map widget that make it compatible with the most recent versions of the notebook and widget libraries (as part of the v1.4.1 update). Let us know if you continue seeing the issue with the update.