<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Error accessing Workforce project in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/error-accessing-workforce-project/m-p/790035#M1566</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/220946"&gt;Matt Starry (SWLP)&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;You need to install the package Workforce package.&lt;/P&gt;&lt;P&gt;To install, use the following link. It also contains sample notebooks.&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://github.com/Esri/workforce-scripts" title="https://github.com/Esri/workforce-scripts"&gt;GitHub - Esri/workforce-scripts: A set of scripts to help administer Workforce projects.&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 18 Aug 2020 16:19:37 GMT</pubDate>
    <dc:creator>MehdiPira1</dc:creator>
    <dc:date>2020-08-18T16:19:37Z</dc:date>
    <item>
      <title>Error accessing Workforce project</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/error-accessing-workforce-project/m-p/790032#M1563</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: helvetica, arial, sans-serif;"&gt;I am trying to access a Workforce project (new version) using the ArcGIS API for Python. I have upgraded ArcGIS Pro to version 2.6, cloned the default environment, and updated the arcgis package to 1.8.2.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: helvetica, arial, sans-serif;"&gt;Here is my code:&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; arcgis

org_url &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'orgurlhere'&lt;/SPAN&gt;
un &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'myUn'&lt;/SPAN&gt;
pw &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'myPw'&lt;/SPAN&gt;
itemId &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'itemid'&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;#Service ItemId&lt;/SPAN&gt;

gis &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcgis&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;gis&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;GIS&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;org_url&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;un&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;pw&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

item &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; gis&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;content&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;get&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;itemId&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
project &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcgis&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;apps&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;workforce&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Project&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;item&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I get the following error:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt;Traceback (most recent call last):&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt; File "C:\myscripts\test_wf.py", line 11, in &amp;lt;module&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt; project = arcgis.apps.workforce.Project(item)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt; File "C:\Users\myun\AppData\Local\ESRI\conda\envs\arcgispro-py3-clone2\lib\site-packages\arcgis\apps\workforce\project.py", line 45, in __init__&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt; self._assignment_schema = AssignmentSchema(self.assignments_layer)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt; File "C:\Users\myun\AppData\Local\ESRI\conda\envs\arcgispro-py3-clone2\lib\site-packages\arcgis\_impl\common\_utils.py", line 158, in _lazy_property&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt; setattr(self, attr_name, fn(self))&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt; File "C:\Users\myun\AppData\Local\ESRI\conda\envs\arcgispro-py3-clone2\lib\site-packages\arcgis\apps\workforce\project.py", line 233, in assignments_layer&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt; return FeatureLayer(self.assignments_layer_url, self.gis)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt; File "C:\Users\myun\AppData\Local\ESRI\conda\envs\arcgispro-py3-clone2\lib\site-packages\arcgis\apps\workforce\project.py", line 183, in assignments_layer_url&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt; return self._item_data['assignments']['url']&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt;KeyError: 'assignments'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt;&lt;SPAN style="font-family: helvetica, arial, sans-serif;"&gt;I am just starting out with the ArcGIS API for Python but this seems pretty basic. Does anyone have any ideas what might be wrong here?&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 09:02:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/error-accessing-workforce-project/m-p/790032#M1563</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-12-12T09:02:36Z</dc:date>
    </item>
    <item>
      <title>Re: Error accessing Workforce project</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/error-accessing-workforce-project/m-p/790033#M1564</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A href="https://community.esri.com/migrated-users/220946"&gt;Matt Starry (SWLP)&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;Can you please explain more about what you are trying to achieve?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Aug 2020 15:51:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/error-accessing-workforce-project/m-p/790033#M1564</guid>
      <dc:creator>MehdiPira1</dc:creator>
      <dc:date>2020-08-18T15:51:16Z</dc:date>
    </item>
    <item>
      <title>Re: Error accessing Workforce project</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/error-accessing-workforce-project/m-p/790034#M1565</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sure. I am&amp;nbsp;exploring the &lt;SPAN style="background-color: #ffffff;"&gt;ArcGIS API for Python. In this&amp;nbsp;test case, I will attempt to update the status and geometry of a single worker (full code not provided). &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;It is my understanding that I have to get the Workforce item and set the project prior to updating the worker info. So, I am running into an issue right out of the gate.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Aug 2020 16:00:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/error-accessing-workforce-project/m-p/790034#M1565</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2020-08-18T16:00:32Z</dc:date>
    </item>
    <item>
      <title>Re: Error accessing Workforce project</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/error-accessing-workforce-project/m-p/790035#M1566</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/220946"&gt;Matt Starry (SWLP)&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;You need to install the package Workforce package.&lt;/P&gt;&lt;P&gt;To install, use the following link. It also contains sample notebooks.&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://github.com/Esri/workforce-scripts" title="https://github.com/Esri/workforce-scripts"&gt;GitHub - Esri/workforce-scripts: A set of scripts to help administer Workforce projects.&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Aug 2020 16:19:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/error-accessing-workforce-project/m-p/790035#M1566</guid>
      <dc:creator>MehdiPira1</dc:creator>
      <dc:date>2020-08-18T16:19:37Z</dc:date>
    </item>
    <item>
      <title>Re: Error accessing Workforce project</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/error-accessing-workforce-project/m-p/790036#M1567</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;After reading that page carefully, I see I have to update the ArcGIS API for Python to version 1.8.3 (pre-release). Once I did that, my script ran as expected with no errors. Thanks for pointing me in the right direction.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Aug 2020 16:35:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/error-accessing-workforce-project/m-p/790036#M1567</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2020-08-18T16:35:56Z</dc:date>
    </item>
  </channel>
</rss>

