Skip to content
This repository has been archived by the owner on Mar 31, 2020. It is now read-only.

arcrest_package on PyPi doesn't work with getting started example #292

Open
tbuckl opened this issue Sep 6, 2016 · 6 comments
Open

arcrest_package on PyPi doesn't work with getting started example #292

tbuckl opened this issue Sep 6, 2016 · 6 comments
Assignees

Comments

@tbuckl
Copy link

tbuckl commented Sep 6, 2016

the upside is that i installed from a git clone and python setup.py and everything worked fine. the downside is that the readme does not suggest that solution.

my setup:
Python 2.7.11 | Anaconda 2.3.0 (x86_64)

install using pip install arcrest_package

the code here:
https://github.com/Esri/ArcREST#getting-started

throws the following error

ArcRestHelperError                        Traceback (most recent call last)
test.py in <module>()
      3 
      4 config = {'username': 'username', 'password': 'password'}
----> 5 token = securityhandlerhelper.securityhandlerhelper(config)
      6 admin = arcrest.manageorg.Administration(securityHandler=token.securityhandler)
      7 content = admin.content

/Users/thomasbuckley/anaconda/lib/python2.7/site-packages/arcresthelper/securityhandlerhelper.pyc in __init__(self, securityinfo)
    357                 "line": line,
    358                 "filename":  filename,
--> 359                 "synerror": synerror,
    360             })
    361 

ArcRestHelperError: {'function': 'securityhandlerhelper_init', 'line': 'line 292', 'synerror': "KeyError: 'security_type'", 'filename': '/anaconda/lib/python2.7/site-packages/arcresthelper/securityhandlerhelper.py'}
@tbuckl tbuckl closed this as completed Sep 7, 2016
@traggatmot
Copy link

Wait- I am getting this error as well. Installed through PyCharm. How does one fix this?

@traggatmot
Copy link

is there a quick work around? Directions to install differently? This problem is on my work computer, Window 10 pro, and I am unfamiliar with how to install differently than thru PyCharm (all my previous python work was on a mac, and I had a workable understanding of that process).

@MikeMillerGIS
Copy link
Member

MikeMillerGIS commented Dec 12, 2016

just place the arcrest and arcresthelper folders into site-packages in you python folder.

@traggatmot
Copy link

I did that and it didn't work.

@MikeMillerGIS
Copy link
Member

I tested this both on 2.7 and 3.x. The version in master works fine. I think we need to update pypi with this version. @achapkowski

@pfgis
Copy link

pfgis commented Jan 13, 2017

I also tried installing this through PIP. It states it successfully installed arcrest-package-3.5.6 and import arcrest statements work. However, I can't get connected to AGOL when running the script through IDLE.

Very simple sample code from here:

import arcrest
username = "myusername"
password = "mypwd"
sh = arcrest.AGOLTokenSecurityHandler(username, password)

leads to AttributeError: 'module' object has no attribute 'AGOLTokenSecurityHandler'

Sample code from the Github readme:

import arcrest
from arcresthelper import securityhandlerhelper
config = {
	"username": "myusername",
	"password": "mypwd"
}
token = securityhandlerhelper.securityhandlerhelper(config)
admin = arcrest.manageorg.Administration(securityHandler=token.securityhandler)
content = admin.content
userInfo = content.users.user()
userInfo.folders

leads to

Traceback (most recent call last):
  File "C:\repos\vegetation\functions\test.py", line 8, in <module>
    from arcresthelper import securityhandlerhelper
  File "C:\Python27\ArcGIS10.2\lib\site-packages\arcresthelper\__init__.py", line 4, in <module>
    from . import featureservicetools
  File "C:\Python27\ArcGIS10.2\lib\site-packages\arcresthelper\featureservicetools.py", line 5, in <module>
    from .securityhandlerhelper import securityhandlerhelper
  File "C:\Python27\ArcGIS10.2\lib\site-packages\arcresthelper\securityhandlerhelper.py", line 5, in <module>
    from arcrest import security
ImportError: cannot import name security

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants