<?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: AttributeError: ERROR 87934 replication and multithreading in ArcGIS Pro 2.9 arcpy in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/attributeerror-error-87934-replication-and/m-p/1136076#M50369</link>
    <description>&lt;P&gt;Answering questing 3 &lt;A href="https://community.esri.com/t5/python-questions/threading-vs-multiprocessing-for-concurrent-gp/m-p/582360#M45653" target="_self"&gt;here.&lt;/A&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;ArcObjects instances (and therefore most arcpy/arcgisscripting objects) cannot cross thread boundaries. That is, if you create an object in one thread, you cannot access it in another.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;</description>
    <pubDate>Fri, 21 Jan 2022 22:48:32 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2022-01-21T22:48:32Z</dc:date>
    <item>
      <title>AttributeError: ERROR 87934 replication and multithreading in ArcGIS Pro 2.9 arcpy</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/attributeerror-error-87934-replication-and/m-p/1134705#M50151</link>
      <description>&lt;P&gt;I needed to run the Subdivide Polygon tool thousands of times, and copy the results to a new geodatabase.&lt;/P&gt;&lt;P&gt;In arcpy, the Subdivide Polygon tool can be run in parallel using&amp;nbsp;concurrent.futures.&amp;nbsp; As far as I can tell, the output feature classes can only be written to the output geodatabase one at a time (serial) due to locking.&lt;/P&gt;&lt;P&gt;In the end I had to write a some blocking logic at the &lt;EM&gt;process &lt;/EM&gt;level. Each process ran the Subdivide Polygon tool and then waited its turn to copy the output to the geodatabase.&lt;/P&gt;&lt;P&gt;The problem arose when using multithreading in the main process as well as sub processes from concurrent.futures. Any time I tried to hop threads and share Subdivide Polygon output, arcpy would crash with AttributeError: ERROR 87934.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What does this error actually mean?&lt;/P&gt;&lt;P&gt;Is it possible to write to a geodatabase in parallel?&lt;/P&gt;&lt;P&gt;Does arcpy allow multithreading? I'd like to know if this is an implementation problem on my end or if arcpy doesn't play well here.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Reference posts for AttributeError 87934: &lt;A href="https://community.esri.com/t5/python-questions/cherrypy-with-arcpy/td-p/42" target="_self"&gt;Cherrypy error&lt;/A&gt;, &lt;A href="https://community.esri.com/t5/geoprocessing-questions/geoprocessing-with-cherrypy-web-framework/td-p/65484" target="_self"&gt;Using Cherrypy&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jan 2022 18:23:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/attributeerror-error-87934-replication-and/m-p/1134705#M50151</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2022-01-18T18:23:46Z</dc:date>
    </item>
    <item>
      <title>Re: AttributeError: ERROR 87934 replication and multithreading in ArcGIS Pro 2.9 arcpy</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/attributeerror-error-87934-replication-and/m-p/1136076#M50369</link>
      <description>&lt;P&gt;Answering questing 3 &lt;A href="https://community.esri.com/t5/python-questions/threading-vs-multiprocessing-for-concurrent-gp/m-p/582360#M45653" target="_self"&gt;here.&lt;/A&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;ArcObjects instances (and therefore most arcpy/arcgisscripting objects) cannot cross thread boundaries. That is, if you create an object in one thread, you cannot access it in another.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Fri, 21 Jan 2022 22:48:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/attributeerror-error-87934-replication-and/m-p/1136076#M50369</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2022-01-21T22:48:32Z</dc:date>
    </item>
  </channel>
</rss>

