<?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 OSError: [Errno 16] Device or resource busy in ArcGIS Online Developers Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-developers-questions/oserror-errno-16-device-or-resource-busy/m-p/1648115#M1600</link>
    <description>&lt;P&gt;Not sure if this is the right board to post this, if not, please advise...&lt;/P&gt;&lt;P&gt;I have a notebook on ArcGIS Online that I have scheduled to run daily. 90% of the time it works, but sometimes it errors out with the error in the title:&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Screenshot_4-9-2025_15234_fnsb.maps.arcgis.com.jpeg" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/139904i0920EC809FAB2F15/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot_4-9-2025_15234_fnsb.maps.arcgis.com.jpeg" alt="Screenshot_4-9-2025_15234_fnsb.maps.arcgis.com.jpeg" /&gt;&lt;/span&gt;Just curious what causes this and any tips to avoid it.&lt;/P&gt;&lt;P&gt;Edit - Narrowed this down to a delete function listed below. But again, most of the time this works. Only rarely does it throw the above error:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;def delete():
    for f in os.listdir(directory):
        if ".snapshot" not in f and ".tasks" not in f:
            if os.path.isfile(os.path.join(directory, f)):
                os.remove(os.path.join(directory, f))
            elif os.path.isdir(os.path.join(directory, f)):
                shutil.rmtree(os.path.join(directory, f))
    # Delete Temporary items
    for i in folder.list():
        if i.title == "temp" and i.type == "CSV":
            i.delete()&lt;/LI-CODE&gt;</description>
    <pubDate>Thu, 04 Sep 2025 23:32:40 GMT</pubDate>
    <dc:creator>RogerAsbury</dc:creator>
    <dc:date>2025-09-04T23:32:40Z</dc:date>
    <item>
      <title>OSError: [Errno 16] Device or resource busy</title>
      <link>https://community.esri.com/t5/arcgis-online-developers-questions/oserror-errno-16-device-or-resource-busy/m-p/1648115#M1600</link>
      <description>&lt;P&gt;Not sure if this is the right board to post this, if not, please advise...&lt;/P&gt;&lt;P&gt;I have a notebook on ArcGIS Online that I have scheduled to run daily. 90% of the time it works, but sometimes it errors out with the error in the title:&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Screenshot_4-9-2025_15234_fnsb.maps.arcgis.com.jpeg" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/139904i0920EC809FAB2F15/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot_4-9-2025_15234_fnsb.maps.arcgis.com.jpeg" alt="Screenshot_4-9-2025_15234_fnsb.maps.arcgis.com.jpeg" /&gt;&lt;/span&gt;Just curious what causes this and any tips to avoid it.&lt;/P&gt;&lt;P&gt;Edit - Narrowed this down to a delete function listed below. But again, most of the time this works. Only rarely does it throw the above error:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;def delete():
    for f in os.listdir(directory):
        if ".snapshot" not in f and ".tasks" not in f:
            if os.path.isfile(os.path.join(directory, f)):
                os.remove(os.path.join(directory, f))
            elif os.path.isdir(os.path.join(directory, f)):
                shutil.rmtree(os.path.join(directory, f))
    # Delete Temporary items
    for i in folder.list():
        if i.title == "temp" and i.type == "CSV":
            i.delete()&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 04 Sep 2025 23:32:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-developers-questions/oserror-errno-16-device-or-resource-busy/m-p/1648115#M1600</guid>
      <dc:creator>RogerAsbury</dc:creator>
      <dc:date>2025-09-04T23:32:40Z</dc:date>
    </item>
  </channel>
</rss>

