Closed jesegal closed 4 years ago
I don't think the archook version number can be right. Pro support wasn't added until afterwards. How did you install it?
archook was installed into a virtual environment using: pip install archook
I've got both ArcGIS Desktop and Pro installed, but the Pro virtual env is activated when I did the above install.
It installed using https://pypi.org/project/archook/ Looks like 1.2.0 is the only archook release there.
@jesegal Until a new release is made I think you'll need to install using a git URL e.g. pip install git+https://github.com/JamesRamm/archook#egg=archook
I'm still getting version 1.2.0 after following the suggestion supplied by @logan-pugh
(arcgispro-py3-clone2) C:\Users\jesegal\Source>pip install git+https://github.com/JamesRamm/archook#egg=archook Collecting archook Cloning https://github.com/JamesRamm/archook to c:\users\jesegal\appdata\local\temp\pip-install-4779nq37\archook Running command git clone -q https://github.com/JamesRamm/archook 'C:\Users\jesegal\AppData\Local\Temp\pip-install-4779nq37\archook' Building wheels for collected packages: archook Building wheel for archook (setup.py) ... done Created wheel for archook: filename=archook-1.2.0-py3-none-any.whl size=11183 sha256=deea304052c2be79b00e5256696b5412aab2d3c1631eebbb6c0d8ee065500d9f Stored in directory: C:\Users\jesegal\AppData\Local\Temp\pip-ephem-wheel-cache-ocvuszg5\wheels\5d\40\ef\8852a921be3251aa9154a69d3e8db4ca3d57432b53559a0bec Successfully built archook Installing collected packages: archook Successfully installed archook-1.2.0
Hmm, you might try a few different things:
Make sure pip is up to date:
python -m pip install --upgrade pip
Install with the editable flag:
pip install -e git+https://github.com/JamesRamm/archook#egg=archook
Install a specific branch:
pip install git+https://github.com/JamesRamm/archook@master#egg=archook
Install a specific commit:
pip install git+https://github.com/JamesRamm/archook@fb0c710c17b1d48c3df8a7b8ef665c3f59df55cd#egg=archook
More info on this syntax here: https://pip.pypa.io/en/stable/reference/pip_install/#git
Thanks for the extra info. The self-reported version number is wrong and I've opened a bug for that.
Do you still get the Type Error with this new install?
Thanks for the assist, this helped. The Type Error issue is cleared. But there's a different problem now. It's failing with a KeyError as line 122, not liking that formatting using arguments by name with Py3.6. I'll open a new issue for that.
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'
archook Version: 1.2.0 python 3.6
r = archook.get_arcpy(pro=True) TypeError: get_arcpy() got an unexpected keyword argument 'pro'