Map is not showing in ArcGIS API for Python demo test.

8130
29
07-03-2018 08:13 AM
by Anonymous User
Not applicable

Getting started with ArcGIS API for Python, and something seems amiss. I was hoping to simply get to the point where I could see a simple map and feel a nice sense of progress, but, while I get no error messages when I try to display the map, I also get no map.

This is probably something VERY simple, but I haven't been able to figure out under my own power. See image, please.

Thank you,

Randy McGregor

29 Replies
NicholeSalinger
New Contributor III

Surely. These are the steps I follow:

  1. Launch Jupyter Notebook from Python Command Prompt and authenticate with a system-generated token. 
  2. Jupyter Notebook opens in Google Chrome (I don't know of a way to change this or what effect it might have). 
  3. Open the sample notebook that I downloaded from ESRI's developer site and start running their pre-configured code. 

I've attached a screenshot with the requested information about the environment below:

0 Kudos
NeilAyres
MVP Alum

Try clicking that "Trusted" button in the top right side

NicholeSalinger
New Contributor III

I pressed the 'Trusted' button but there's no change to the code - same error message

   

0 Kudos
simoxu
by MVP Regular Contributor
MVP Regular Contributor

Well, It's hard to say what exactly is causing the problem, since there are so many ways that can go wrong, it may be useful to provide you a proven working one:

 

python version:  3.6.4 |Anaconda, Inc.| (default, Jan 16 2018, 10:22:32) [MSC v.1900 64 bit (AMD64)] 
arcgis API version:  1.5.0 
widgetnbextension:  
3.2.1 ipywidgets version:  7.2.1

and check if the map widget is enabled in notebook:

jupyter nbextension list

if not, enable it:

jupyter nbextension enable --py --sys-prefix widgetsnbextension

jupyter nbextension enable --py --sys-prefix arcgis

Although we cannot pinpoint the issue, but we can safely say it's a map widget problem and there are many layers of stuff (Python, ipython, ipywidgets, widgetsnbextension and the MapView) involved to make a widget working and any mismatch can cause it collapse.

There's a GitHub post that might have well passed the used-by date, but still, it can provides some clue for this sort of problem:

Map is not displayed in Jupyter notebook · Issue #159 · Esri/arcgis-python-api · GitHub 

NicholeSalinger
New Contributor III

UPDATE: I called ESRI customer service and we figured out that I needed to upgrade the ArcGIS Pro software from 2.1 to 2.2 because they were able to reproduce the 404 GET issue in ArcGIS Pro 2.1 but not if using ArcGIS Pro 2.2. After upgrading to 2.2 and updating all the python packages, the code worked perfectly! Thank you for providing feedback!

MarkRushing1
New Contributor

I am having this same issue.  I have this for my code:same issue full code

My versions are:

3.6.5

1.4.1

7.2.1

any help  would be appreciated

0 Kudos
by Anonymous User
Not applicable

Thanks everyone for input. This was related to a problem with ArcGIS Pro install, as many suggested. I tried several things and what I think did the trick was loading a new instance of Jupyter Notebook that is different from the one that came with ArcGiS Pro. This opens and "sees" the ArcGIS API for Python, draws maps and basically works. Not autofill though

0 Kudos
DavidKovar1
New Contributor

I have a fresh install of ArcGIS Pro and am trying to use jupyter-lab to work through the exercises. As others have discovered, when I try to display a map it generates a broken link:

Capture.PNG

 I've worked through everything in this thread - ArcGIS Pro is updated, conda updated everything, etc. No dice.

Console window:

Capture.PNG

 Any help would be most appreciated.

-David

0 Kudos
GuusvanderPutten
New Contributor

I'm having a similar issue.

I have two cells running the exact same code.

GuusvanderPutten_1-1618823650500.png

and:

GuusvanderPutten_2-1618823669182.png

The first block of code returns an error I've never seen before and can't find online:

GuusvanderPutten_3-1618823735354.png

The second block returns a map box with no map and this error:

GuusvanderPutten_4-1618823769565.png

Looking in the console it appears to be this error that is causing the issue.

GuusvanderPutten_5-1618823819027.png

Is anyone familiar with this error and knows how to fix this?

I'm doing a tutorial and can't even figure out how to just show a map.
I rebooted jupyter numerous of times and also rebooted my pc, hoping that would fix it but sadly no.

Thanks in advance!

With kind regards,

Guus van der Putten

 

0 Kudos
GuusvanderPutten
New Contributor

I also saw that the myGIS.map in the first block didn't have the () behind them. 

This did solve the bound method error, but sadly not the second error.

0 Kudos