JamesRamm / archook

Searches the system for arcgis and makes arcpy available to python (regardless of pythonpath/system path/registry settings)
GNU General Public License v2.0
81 stars 28 forks source link

KeyError caused by unsupported string formatting Py3 #28

Closed jesegal closed 4 years ago

jesegal commented 4 years ago

Recommend: use "{C} {P}".format( C=C, P=P)


Python 3.6.6 |Anaconda, Inc.| (default, Jun 28 2018, 11:27:44) [MSC v.1900 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information.

import archook archook.get_arcpy(pro=True) Traceback (most recent call last): File "", line 1, in File "C:\Users\jesegal\AppData\Local\ESRI\conda\envs\arcgispro-py3-clone2\lib\site-packages\archook\archook.py", line 158, in get_arcpy winpaths, syspaths = get_pro_paths() File "C:\Users\jesegal\AppData\Local\ESRI\conda\envs\arcgispro-py3-clone2\lib\site-packages\archook\archook.py", line 122, in get_pro_paths C, P KeyError: 'C'

mhw-at-yg commented 4 years ago

Thank you! I was pulling hairs trying to satisfy both python 2 and 3. (Earlier version used f-strings).