AnsweredAssumed Answered

ArcGIS API for Python no longer works after upgrade to ArcGIS Pro 2.5

Question asked by jhuillery_mbhydro on Feb 8, 2020
Latest reply on Feb 12, 2020 by s.kumar-esristaff

Error when attempting to import after upgrading to 2.5:

 

>>> from arcgis.gis import GIS
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\__init__.py", line 3, in <module>
from . import (features, geoanalytics, geocoding, geometry,
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\features\__init__.py", line 28, in <module>
from . import enrich_data
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\features\enrich_data.py", line 10, in <module>
import arcgis.network as network
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\network\__init__.py", line 7, in <module>
from ._layer import NetworkLayer, NetworkDataset, ClosestFacilityLayer, ServiceAreaLayer, RouteLayer, NAJob
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\network\_layer.py", line 8, in <module>
from arcgis.mapping import MapImageLayer
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\mapping\__init__.py", line 8, in <module>
from ._types import WebMap, WebScene, MapImageLayer, MapImageLayerManager, VectorTileLayer, OfflineMapAreaManager, PackagingJob
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\mapping\_types.py", line 19, in <module>
from arcgis.widgets import MapView
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\widgets\__init__.py", line 2, in <module>
from arcgis.widgets._mapview import MapView
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\widgets\_mapview.py", line 15, in <module>
from ipywidgets import widgets
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\ipywidgets\__init__.py", line 25, in <module>
from .widgets import *
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\ipywidgets\widgets\__init__.py", line 4, in <module>
from .widget import Widget, CallbackDispatcher, register, widget_serialization
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\ipywidgets\widgets\widget.py", line 18, in <module>
from ipykernel.comm import Comm
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\ipykernel\comm\__init__.py", line 1, in <module>
from .manager import *
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\ipykernel\comm\manager.py", line 15, in <module>
from .comm import Comm
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\ipykernel\comm\comm.py", line 9, in <module>
from ipykernel.kernelbase import Kernel
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\ipykernel\kernelbase.py", line 19, in <module>
from jupyter_client.session import utcnow as now
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\jupyter_client\session.py", line 56, in <module>
from zmq.eventloop.ioloop import IOLoop
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\zmq\eventloop\__init__.py", line 3, in <module>
from zmq.eventloop.ioloop import IOLoop
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\zmq\eventloop\ioloop.py", line 78, in <module>
while _IOLoop.configurable_default() is not _IOLoop:
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\tornado\ioloop.py", line 328, in configurable_default
from tornado.platform.asyncio import AsyncIOLoop
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\tornado\platform\asyncio.py", line 34, in <module>
asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
AttributeError: module 'asyncio' has no attribute 'WindowsSelectorEventLoopPolicy'

Outcomes