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\", line 8, in <module>
    from arcgis.gis import GIS
  File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\arcgis\", 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\", 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\", 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\", line 929
SyntaxError: Non-ASCII character '\xe2' in file C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\arcgis\gis\ on
line 930, but no encoding declared; see for details