<?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: Workforce migrate_assignments.py in ArcGIS Workforce Questions</title>
    <link>https://community.esri.com/t5/arcgis-workforce-questions/workforce-migrate-assignments-py/m-p/1153020#M2303</link>
    <description>&lt;P&gt;Whoa!&amp;nbsp; Thank you so much for picking out that minor issue and taking the time to share the correction with me.&amp;nbsp; Such a frustrating problem and such a simple solution.&amp;nbsp; Again many thanks.&lt;/P&gt;</description>
    <pubDate>Fri, 11 Mar 2022 18:54:16 GMT</pubDate>
    <dc:creator>PLadd</dc:creator>
    <dc:date>2022-03-11T18:54:16Z</dc:date>
    <item>
      <title>Workforce migrate_assignments.py</title>
      <link>https://community.esri.com/t5/arcgis-workforce-questions/workforce-migrate-assignments-py/m-p/1012521#M1740</link>
      <description>&lt;P&gt;Hello. I am trying to use the 'migrate_assignments' script to move assignment data from Classic Workforce projects to new Workforce projects in ArcGIS for Enterprise (10.8.1 with Workforce patch installed).&amp;nbsp; I have already used the 'migrate' utility in the Workforce web app dashboard to create new Workforce projects from the classic ones.&amp;nbsp; I am using ArcGIS Pro 2.7.0 which now has ArcGIS for Python 1.8.3.&amp;nbsp; I am using the 'migrate assignment only' command prompt provided in a blog dated August 31, 2020 (&lt;A href="https://www.esri.com/arcgis-blog/products/workforce/field-mobility/migrate-a-classic-workforce-project/" target="_blank" rel="noopener"&gt;Migrate a Classic Workforce project (esri.com)&lt;U&gt;.&lt;/U&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;From the blog: python migrate_assignments.py -u &amp;lt;username&amp;gt; -p &amp;lt;password&amp;gt; -org https://&amp;lt;org&amp;gt;.maps.arcgis.com -classic-project-id &amp;lt;project-item-id&amp;gt; -new-project-id &amp;lt;new-project-fs-item-id&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I am running the script from the python shell in Pro.&amp;nbsp; Regardless of the command line settings, I receive a syntax error.&amp;nbsp; I place double quotes around the parameters instead of the &amp;lt; &amp;gt;.&lt;/P&gt;&lt;P&gt;python drive:\folder\folder\migrate_assignments.py -u "username" -p "password" -org "&lt;A href="https://webadaptor.cityofnewarkde.us/portal" target="_blank" rel="noopener"&gt;https://webadaptor.cityofnewarkde.us/portal&lt;/A&gt;" -classic-project-id 5c792f3583e44a6b910076d0d7f04628 -new-project-id 766c82cff9464341850ce625c6e99a76&lt;/P&gt;&lt;P&gt;I could not find a way to download the script directly from GitHub.&amp;nbsp; Rather, I had to copy the code and paste it into Notepad to create the migrate_assignments.py.&lt;/P&gt;&lt;P&gt;I have tried many iterations when it comes to placing the double quotes around the parameters.&amp;nbsp; My lack of experience is evident here.&amp;nbsp; The user has admin privileges.&lt;/P&gt;&lt;P&gt;I am at a loss as to why this script is not running, or as to what operator error is getting in the way.&amp;nbsp; Any help would be appreciated.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Dec 2020 20:04:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-workforce-questions/workforce-migrate-assignments-py/m-p/1012521#M1740</guid>
      <dc:creator>JayHodny</dc:creator>
      <dc:date>2020-12-28T20:04:07Z</dc:date>
    </item>
    <item>
      <title>Re: Workforce migrate_assignments.py</title>
      <link>https://community.esri.com/t5/arcgis-workforce-questions/workforce-migrate-assignments-py/m-p/1012531#M1741</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/264515"&gt;@JayHodny&lt;/a&gt;&lt;/P&gt;&lt;P&gt;You can directly download it from Github using the "Code" button and choose "Download Zip".&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AaronPulver_0-1609185970720.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/2914i3BD04B47211479C4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AaronPulver_0-1609185970720.png" alt="AaronPulver_0-1609185970720.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;You need to run the script from the command-line not from the built-in Python Interpreter in ArcGIS Pro. So open "Python Command Prompt" from inside the ArcGIS folder. This will activate the correct conda environment for you.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2020-12-28 at 3.09.17 PM.png" style="width: 322px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/2918i55A96711E7AC243E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screen Shot 2020-12-28 at 3.09.17 PM.png" alt="Screen Shot 2020-12-28 at 3.09.17 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Then run the script there (after putting in all the parameters):&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2020-12-28 at 3.13.51 PM.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/2919i5C2A8DB1797B8B29/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screen Shot 2020-12-28 at 3.13.51 PM.png" alt="Screen Shot 2020-12-28 at 3.13.51 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Dec 2020 20:15:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-workforce-questions/workforce-migrate-assignments-py/m-p/1012531#M1741</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2020-12-28T20:15:09Z</dc:date>
    </item>
    <item>
      <title>Re: Workforce migrate_assignments.py</title>
      <link>https://community.esri.com/t5/arcgis-workforce-questions/workforce-migrate-assignments-py/m-p/1012534#M1742</link>
      <description>&lt;P&gt;Hi Aaron,&lt;/P&gt;&lt;P&gt;Good grief, how did I miss the download section?...sigh.......OK, let me give this a try.&amp;nbsp; And thank you.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jay&lt;/P&gt;</description>
      <pubDate>Mon, 28 Dec 2020 20:21:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-workforce-questions/workforce-migrate-assignments-py/m-p/1012534#M1742</guid>
      <dc:creator>JayHodny</dc:creator>
      <dc:date>2020-12-28T20:21:22Z</dc:date>
    </item>
    <item>
      <title>Re: Workforce migrate_assignments.py</title>
      <link>https://community.esri.com/t5/arcgis-workforce-questions/workforce-migrate-assignments-py/m-p/1012675#M1743</link>
      <description>&lt;P&gt;Hi Aaron,&lt;/P&gt;&lt;P&gt;We continued to run into an error when running the script.&amp;nbsp; The error was stating '&lt;EM&gt;assignmentRead&lt;/EM&gt; was not listed in the table' (or something to this effect).&amp;nbsp; After spending considerable time in trial and error in the command line settings, we realized the Python code specified "assignment&lt;STRONG&gt;&lt;EM&gt;R&lt;/EM&gt;&lt;/STRONG&gt;ead," while the field in the classic Workforce assignment feature service&amp;nbsp;was named "assignment&lt;EM&gt;&lt;STRONG&gt;r&lt;/STRONG&gt;&lt;/EM&gt;ead."&amp;nbsp; In our copy of the Python script, we edited the field name to all lower case and the script ran successfully.&lt;/P&gt;&lt;P&gt;Thanks again for your help,&lt;/P&gt;&lt;P&gt;Jay&lt;/P&gt;</description>
      <pubDate>Tue, 29 Dec 2020 16:52:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-workforce-questions/workforce-migrate-assignments-py/m-p/1012675#M1743</guid>
      <dc:creator>JayHodny</dc:creator>
      <dc:date>2020-12-29T16:52:40Z</dc:date>
    </item>
    <item>
      <title>Re: Workforce migrate_assignments.py</title>
      <link>https://community.esri.com/t5/arcgis-workforce-questions/workforce-migrate-assignments-py/m-p/1152946#M2297</link>
      <description>&lt;P data-unlink="true"&gt;Maybe somebody on this thread can help.&amp;nbsp; When running "&lt;SPAN&gt;conda env create --file environment.yml" from the instructions &lt;A href="https://www.esri.com/arcgis-blog/products/workforce/field-mobility/migrate-a-classic-workforce-project/#:~:text=If%20you%20don't%20need,The%20Migrate%20project%20window%20appears." target="_blank" rel="noopener"&gt;on this page&lt;/A&gt;, I get&amp;nbsp;a pip error and the code stops running.&amp;nbsp; Having no experience with Python but desperately wanting to migrate my project's assignments, I need to resolve this problem that ESRI's code has created for me.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P data-unlink="true"&gt;&lt;SPAN&gt;Has anybody encountered a pip error when running this or know how to overcome a pip issue?&lt;/SPAN&gt;&lt;/P&gt;&lt;P data-unlink="true"&gt;&lt;SPAN&gt;Here's what the error looks like:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;++++++++++++++++++++++&lt;/P&gt;&lt;P&gt;Pip subprocess error:&lt;BR /&gt;error: subprocess-exited-with-error&lt;/P&gt;&lt;P&gt;× python setup.py egg_info did not run successfully.&lt;BR /&gt;│ exit code: 1&lt;BR /&gt;╰─&amp;gt; [1 lines of output]&lt;BR /&gt;error in pypng setup command: use_2to3 is invalid.&lt;BR /&gt;[end of output]&lt;/P&gt;&lt;P&gt;note: This error originates from a subprocess, and is likely not a problem with pip.&lt;BR /&gt;error: metadata-generation-failed&lt;/P&gt;&lt;P&gt;++++++++++++++++++++++&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Mar 2022 15:20:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-workforce-questions/workforce-migrate-assignments-py/m-p/1152946#M2297</guid>
      <dc:creator>PLadd</dc:creator>
      <dc:date>2022-03-11T15:20:17Z</dc:date>
    </item>
    <item>
      <title>Re: Workforce migrate_assignments.py</title>
      <link>https://community.esri.com/t5/arcgis-workforce-questions/workforce-migrate-assignments-py/m-p/1152956#M2298</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/7136"&gt;@PLadd&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What operating system are you using for this?&lt;/P&gt;</description>
      <pubDate>Fri, 11 Mar 2022 15:48:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-workforce-questions/workforce-migrate-assignments-py/m-p/1152956#M2298</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2022-03-11T15:48:06Z</dc:date>
    </item>
    <item>
      <title>Re: Workforce migrate_assignments.py</title>
      <link>https://community.esri.com/t5/arcgis-workforce-questions/workforce-migrate-assignments-py/m-p/1152957#M2299</link>
      <description>&lt;P&gt;Thanks for the quick response - Windows 10.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Mar 2022 15:49:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-workforce-questions/workforce-migrate-assignments-py/m-p/1152957#M2299</guid>
      <dc:creator>PLadd</dc:creator>
      <dc:date>2022-03-11T15:49:29Z</dc:date>
    </item>
    <item>
      <title>Re: Workforce migrate_assignments.py</title>
      <link>https://community.esri.com/t5/arcgis-workforce-questions/workforce-migrate-assignments-py/m-p/1152967#M2300</link>
      <description>&lt;P&gt;UPDATE: Have some further info.&amp;nbsp; Tried using the command below after &lt;A href="https://setuptools.pypa.io/en/latest/history.html#v58-0-0" target="_blank" rel="noopener"&gt;landing on this page&lt;/A&gt;&amp;nbsp; and &lt;A href="https://stackoverflow.com/questions/69100275/error-while-downloading-the-requirements-using-pip-install-setup-command-use-2" target="_blank" rel="noopener"&gt;this page&lt;/A&gt; from google search of the pip error:&amp;nbsp;&lt;/P&gt;&lt;P&gt;pip install setuptools==58.0.3&lt;/P&gt;&lt;P&gt;But still getting the error.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Mar 2022 16:11:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-workforce-questions/workforce-migrate-assignments-py/m-p/1152967#M2300</guid>
      <dc:creator>PLadd</dc:creator>
      <dc:date>2022-03-11T16:11:27Z</dc:date>
    </item>
    <item>
      <title>Re: Workforce migrate_assignments.py</title>
      <link>https://community.esri.com/t5/arcgis-workforce-questions/workforce-migrate-assignments-py/m-p/1152983#M2301</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/7136"&gt;@PLadd&lt;/a&gt;in the &lt;EM&gt;environment.yml&lt;/EM&gt; file at the bottom, there is a dependency called &lt;EM&gt;pypng&lt;/EM&gt;. Try changing that one line from:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;- pypng==0.0.18&lt;/LI-CODE&gt;&lt;P&gt;to&lt;/P&gt;&lt;LI-CODE lang="python"&gt;- pypng==0.0.21&lt;/LI-CODE&gt;&lt;P&gt;This should resolve the issue by upgrading that library. I tested this fix on a Windows 10 machine. I'll push up a fix to the repo later after I verify it doesn't break any of the notebooks that use that library.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Mar 2022 16:49:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-workforce-questions/workforce-migrate-assignments-py/m-p/1152983#M2301</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2022-03-11T16:49:37Z</dc:date>
    </item>
    <item>
      <title>Re: Workforce migrate_assignments.py</title>
      <link>https://community.esri.com/t5/arcgis-workforce-questions/workforce-migrate-assignments-py/m-p/1153020#M2303</link>
      <description>&lt;P&gt;Whoa!&amp;nbsp; Thank you so much for picking out that minor issue and taking the time to share the correction with me.&amp;nbsp; Such a frustrating problem and such a simple solution.&amp;nbsp; Again many thanks.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Mar 2022 18:54:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-workforce-questions/workforce-migrate-assignments-py/m-p/1153020#M2303</guid>
      <dc:creator>PLadd</dc:creator>
      <dc:date>2022-03-11T18:54:16Z</dc:date>
    </item>
    <item>
      <title>Re: Workforce migrate_assignments.py</title>
      <link>https://community.esri.com/t5/arcgis-workforce-questions/workforce-migrate-assignments-py/m-p/1153051#M2304</link>
      <description>&lt;P&gt;Next issue with Migrating Classic Workforce project using these steps:&lt;/P&gt;&lt;P&gt;When I run this:&lt;/P&gt;&lt;P&gt;migrate_assignments.py -u &amp;lt;username&amp;gt; -p &amp;lt;password&amp;gt; -org https://&amp;lt;org&amp;gt;.maps.arcgis.com -classic-project-id &amp;lt;project-item-id&amp;gt; -new-project-id &amp;lt;new-project-fs-item-id&amp;gt;&lt;/P&gt;&lt;P&gt;it throws an error that there is invalid syntax on this line:&lt;/P&gt;&lt;P&gt;logger.info(f"Migrating attachments for assignment {i + 1}/{len(existing_assignments)} objectId: {object_id}")&lt;/P&gt;&lt;P&gt;Anybody know what this means and a viable solution?&lt;/P&gt;</description>
      <pubDate>Fri, 11 Mar 2022 19:53:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-workforce-questions/workforce-migrate-assignments-py/m-p/1153051#M2304</guid>
      <dc:creator>PLadd</dc:creator>
      <dc:date>2022-03-11T19:53:05Z</dc:date>
    </item>
    <item>
      <title>Re: Workforce migrate_assignments.py</title>
      <link>https://community.esri.com/t5/arcgis-workforce-questions/workforce-migrate-assignments-py/m-p/1153059#M2305</link>
      <description>&lt;P&gt;My guess is&amp;nbsp; you are running the script with the wrong python interpreter (e.g. Python 2 instead of Python 3). Make sure you run this in the command prompt/terminal first:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;conda activate workforce-scripts&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Then run:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;python migrate_assignments.py ....&lt;/P&gt;&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Fri, 11 Mar 2022 20:05:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-workforce-questions/workforce-migrate-assignments-py/m-p/1153059#M2305</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2022-03-11T20:05:54Z</dc:date>
    </item>
    <item>
      <title>Re: Workforce migrate_assignments.py</title>
      <link>https://community.esri.com/t5/arcgis-workforce-questions/workforce-migrate-assignments-py/m-p/1153500#M2312</link>
      <description>&lt;P&gt;I finally got migrate_assignments.py to run. For anyone having to use migrate_assignments.py, Aaron's suggestion regarding changing&amp;nbsp;last line in environment.yml to - pypng==0.0.21 from - pypng==0.0.18 was a critical point.&amp;nbsp; Check this line to see if it needs fixing.&lt;/P&gt;&lt;P&gt;Since I'm using Windows 10, "conda" didn't work for me -&amp;nbsp; so instead just typed "activate workforce-scripts" and that worked.&lt;/P&gt;&lt;P&gt;Also, I'm using ArcGIS Enterprise and had to add "portal" to my URL (see sample below comparing parameters to run code):&lt;/P&gt;&lt;P&gt;python migrate_assignments.py -u &amp;lt;username&amp;gt; -p &amp;lt;password&amp;gt; &lt;STRONG&gt;-org &lt;A href="https://%3corg%3e.maps.arcgis.com" target="_blank"&gt;https://&amp;lt;org&amp;gt;.maps.arcgis.com&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;-classic-project-id &amp;lt;project-item-id&amp;gt; -new-project-id &amp;lt;new-project-fs-item-id&amp;gt;&lt;/P&gt;&lt;P&gt;SHOULD BE:&lt;/P&gt;&lt;P&gt;python migrate_assignments.py -u &amp;lt;username&amp;gt; -p &amp;lt;password&amp;gt; -org &lt;STRONG&gt;&lt;A href="https://mygis.com/portal" target="_blank"&gt;https://mygis.com/portal&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;-classic-project-id &amp;lt;project-item-id&amp;gt; -new-project-id &amp;lt;new-project-fs-item-id&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Mar 2022 19:42:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-workforce-questions/workforce-migrate-assignments-py/m-p/1153500#M2312</guid>
      <dc:creator>PLadd</dc:creator>
      <dc:date>2022-03-14T19:42:10Z</dc:date>
    </item>
  </channel>
</rss>

