<?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: Window Task Scheduler Error with Python Script in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/window-task-scheduler-error-with-python-script/m-p/1036459#M60396</link>
    <description>&lt;P&gt;I couldn't get past the path issue and it should be&lt;/P&gt;&lt;LI-CODE lang="python"&gt;r'C:\ArcGISETL\DataLoads\test\WeeklyParcelPoly\test'&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;with no ( )&lt;/P&gt;&lt;P&gt;did it error in your last incarnation?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 15 Mar 2021 04:17:30 GMT</pubDate>
    <dc:creator>DanPatterson</dc:creator>
    <dc:date>2021-03-15T04:17:30Z</dc:date>
    <item>
      <title>Window Task Scheduler Error with Python Script</title>
      <link>https://community.esri.com/t5/python-questions/window-task-scheduler-error-with-python-script/m-p/1036416#M60393</link>
      <description>&lt;P&gt;I am stuck. I have python 2.7.16, ArcGIS Pro 2.7.1 and ArcMap 10.7.1 on the machine. I have a python script stand alone. It said it already run but then I have an error (0x2) with window task scheduler. I provided screenshots and one of pieces python script below. Please advise. I can provide more screenshots / info if needed.&lt;/P&gt;&lt;P&gt;It used to work but now I am not sure what is going on. It needs to be download zip file folder and extract it all from ArcGIS online to windows machine. It is actually working download zipped folder but it doesn't work to extract it all anymore.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AlexP__6-1615767655481.png" style="width: 576px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/8422i1E80274806E00945/image-dimensions/576x98?v=v2" width="576" height="98" role="button" title="AlexP__6-1615767655481.png" alt="AlexP__6-1615767655481.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AlexP__1-1615766585743.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/8417iC15DAD77B1F2EAE7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AlexP__1-1615766585743.png" alt="AlexP__1-1615766585743.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AlexP__0-1615766263927.png" style="width: 552px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/8414i2BC67ACDE1DAF2C5/image-dimensions/552x69?v=v2" width="552" height="69" role="button" title="AlexP__0-1615766263927.png" alt="AlexP__0-1615766263927.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AlexP__2-1615766767138.png" style="width: 497px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/8418i5944118B670BC7A3/image-dimensions/497x305?v=v2" width="497" height="305" role="button" title="AlexP__2-1615766767138.png" alt="AlexP__2-1615766767138.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;UNDER &lt;STRONG&gt;ACTION&lt;/STRONG&gt; TAB:&lt;/P&gt;&lt;P&gt;#1 &lt;STRONG&gt;START A PROGRAM&lt;/STRONG&gt;:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Program/script:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;C:\ArcGISETL\DataLoads\test\WeeklyParcelPoly\DownloadPAData.bat&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AlexP__4-1615766996665.png" style="width: 415px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/8420i81D50A120F71A3AD/image-dimensions/415x454?v=v2" width="415" height="454" role="button" title="AlexP__4-1615766996665.png" alt="AlexP__4-1615766996665.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;#2 &lt;STRONG&gt;START A PROGRAM&lt;/STRONG&gt;:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Program/script:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;C:\Python27\ArcGISx6410.7\python.exe&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Add arguments (optional):&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;C:\ArcGISETL\DataLoads\test\WeeklyParcelPoly\test_Weekly_GDB_OpenData - Copy.py&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AlexP__5-1615767060456.png" style="width: 409px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/8421iAB4FFC483F6E848D/image-dimensions/409x442?v=v2" width="409" height="442" role="button" title="AlexP__5-1615767060456.png" alt="AlexP__5-1615767060456.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AlexP__7-1615768042000.png" style="width: 658px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/8423iF0A5588ED2BB055F/image-dimensions/658x46?v=v2" width="658" height="46" role="button" title="AlexP__7-1615768042000.png" alt="AlexP__7-1615768042000.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AlexP__8-1615768121660.png" style="width: 649px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/8424i9DCE1179C3C05047/image-dimensions/649x119?v=v2" width="649" height="119" role="button" title="AlexP__8-1615768121660.png" alt="AlexP__8-1615768121660.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AlexP__6-1615767655481.png" style="width: 576px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/8422i1E80274806E00945/image-dimensions/576x98?v=v2" width="576" height="98" role="button" title="AlexP__6-1615767655481.png" alt="AlexP__6-1615767655481.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;# coding: utf-8

# In[5]:


from arcgis.gis import GIS

# Python Standard Library Modules
from pathlib import Path, PurePath
from zipfile import ZipFile

public_data_item_id = '123'

anon_gis = GIS(username="test", password="test")

data_item = anon_gis.content.get(public_data_item_id)

data_path = Path('C:\ArcGISETL\DataLoads\test\WeeklyParcelPoly\test')

if not data_path.exists():
    data_path.mkdir()

zip_path = data_path.joinpath('PAData.zip')
extract_path = data_path.joinpath('PADataDatasets')

data_item.download(save_path=data_path)

print (PurePath(zip_path))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Mar 2021 00:33:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/window-task-scheduler-error-with-python-script/m-p/1036416#M60393</guid>
      <dc:creator>AlexP_</dc:creator>
      <dc:date>2021-03-15T00:33:43Z</dc:date>
    </item>
    <item>
      <title>Re: Window Task Scheduler Error with Python Script</title>
      <link>https://community.esri.com/t5/python-questions/window-task-scheduler-error-with-python-script/m-p/1036417#M60394</link>
      <description>&lt;LI-CODE lang="python"&gt;path = 'C:\ArcGISETL\DataLoads\test\WeeklyParcelPoly\test'
print(path)
C:\ArcGISETL\DataLoads	est\WeeklyParcelPoly	est

# ---- raw encoding.... little 'r'

path = r'C:\ArcGISETL\DataLoads\test\WeeklyParcelPoly\test'
print(path)
C:\ArcGISETL\DataLoads\test\WeeklyParcelPoly\test&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 15 Mar 2021 00:46:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/window-task-scheduler-error-with-python-script/m-p/1036417#M60394</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2021-03-15T00:46:59Z</dc:date>
    </item>
    <item>
      <title>Re: Window Task Scheduler Error with Python Script</title>
      <link>https://community.esri.com/t5/python-questions/window-task-scheduler-error-with-python-script/m-p/1036422#M60395</link>
      <description>&lt;P&gt;&amp;nbsp;I am a bit lost. Is this what you meant as below? Please correct me if I am wrong.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;# coding: utf-8

# In[5]:


from arcgis.gis import GIS

# Python Standard Library Modules
from pathlib import Path, PurePath
from zipfile import ZipFile

public_data_item_id = '123'

anon_gis = GIS(username="test", password="test")

data_item = anon_gis.content.get(public_data_item_id)

data_path = Path = r('C:\ArcGISETL\DataLoads\test\WeeklyParcelPoly\test')

if not data_path.exists():
    data_path.mkdir()

zip_path = data_path.joinpath('PAData.zip')
extract_path = data_path.joinpath('PADataDatasets')

data_item.download(save_path=data_path)

print(path)
C:\ArcGISETL\DataLoads\test\WeeklyParcelPoly\test&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Mar 2021 01:37:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/window-task-scheduler-error-with-python-script/m-p/1036422#M60395</guid>
      <dc:creator>AlexP_</dc:creator>
      <dc:date>2021-03-15T01:37:39Z</dc:date>
    </item>
    <item>
      <title>Re: Window Task Scheduler Error with Python Script</title>
      <link>https://community.esri.com/t5/python-questions/window-task-scheduler-error-with-python-script/m-p/1036459#M60396</link>
      <description>&lt;P&gt;I couldn't get past the path issue and it should be&lt;/P&gt;&lt;LI-CODE lang="python"&gt;r'C:\ArcGISETL\DataLoads\test\WeeklyParcelPoly\test'&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;with no ( )&lt;/P&gt;&lt;P&gt;did it error in your last incarnation?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Mar 2021 04:17:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/window-task-scheduler-error-with-python-script/m-p/1036459#M60396</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2021-03-15T04:17:30Z</dc:date>
    </item>
    <item>
      <title>Re: Window Task Scheduler Error with Python Script</title>
      <link>https://community.esri.com/t5/python-questions/window-task-scheduler-error-with-python-script/m-p/1036461#M60397</link>
      <description>&lt;P&gt;It has been fixed. Thank you&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/215600"&gt;@DanPatterson&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Mar 2021 04:23:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/window-task-scheduler-error-with-python-script/m-p/1036461#M60397</guid>
      <dc:creator>AlexP_</dc:creator>
      <dc:date>2021-03-15T04:23:15Z</dc:date>
    </item>
    <item>
      <title>Re: Window Task Scheduler Error with Python Script</title>
      <link>https://community.esri.com/t5/python-questions/window-task-scheduler-error-with-python-script/m-p/1036462#M60398</link>
      <description>&lt;P&gt;It is fixed now and yes, it is working with (). Thank&amp;nbsp; you&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/215600"&gt;@DanPatterson&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Mar 2021 04:25:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/window-task-scheduler-error-with-python-script/m-p/1036462#M60398</guid>
      <dc:creator>AlexP_</dc:creator>
      <dc:date>2021-03-15T04:25:06Z</dc:date>
    </item>
  </channel>
</rss>

