ArcGIS Python API Error Connecting to New Workforce Project

814
6
11-03-2020 12:02 PM
EdFarrell
New Contributor III

I am trying to connect to a "new" (not classic) Workforce project using the Python API. I am encountering an error (see below). This code works for "classic" projects, and I've seen examples of this working for new projects. I've reproduced this error using version 1.8.0.post1 and 1.8.2 locally and 1.8.1 within AGO notebook. Help appreciated. 

0 Kudos
6 Replies
by Anonymous User
Not applicable

You need to update to version 1.8.3 of the API which is in pre-release

conda install -c esri/label/prerelease -c esri arcgis

EdFarrell
New Contributor III

Aaron,

My virtualenv is not managed by conda. I've been using pip (i.e pip install arcgis, which gets me to 1.8.2 stable). Is there a pre-release available in pypi? Or do I have to use conda?

0 Kudos
by Anonymous User
Not applicable

Pre-release is only available on conda. 1.8.3 is scheduled to be officially released in a few weeks then it will be available on conda and pypi.

EdFarrell
New Contributor III

Aaron,

Is there a release/support timeline or github repo that I can monitor to check for the upcoming release?

0 Kudos
by Anonymous User
Not applicable

I think you can watch for releases here: Releases · Esri/arcgis-python-api · GitHub 

by Anonymous User
Not applicable

I was able to get around this by treating it like a regular hosted feature layer and pulling out the assignment layer by its index #

 

workforce_project_item = gis.content.get("itemidhere*****")
workforce_project_item
assign_layer = workforce_project_item.layers[0]

 

Worked without upgrading to the pre release (1.7.0)

0 Kudos