AnsweredAssumed Answered

Error in importing arcgis.gis module

Question asked by yguan16 on Jul 19, 2018
Latest reply on Jul 20, 2018 by bixb0012

My python script for ArcGIS API work perfect in jupyter notebook. But to automate the task, I downloaded it as a python script and run from a bat file on Windows 7. But the call  "from arcgis.gis import GIS" fails with these errors. Any idea?

 

Traceback (most recent call last):
  File "W:\gis_data_admin\Admin\Scripts\BHP_AGOL\BHP_AGOL_Users_Mig.py", line 8, in <module>
    from arcgis.gis import GIS
  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, geoprocessing, network, raster, realtime, schematics, mapping
  File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\arcgis\features\__init__.py", line 21, in <module>
    from .feature import Feature, FeatureSet, FeatureCollection
  File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\arcgis\features\feature.py", line 16, in <module>
    from arcgis.gis import Layer
  File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\arcgis\gis\__init__.py", line 929
SyntaxError: Non-ASCII character '\xe2' in file C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\arcgis\gis\__init__.py on
line 930, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details

Outcomes