<?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 filegdb.dll error in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/filegdb-dll-error/m-p/293286#M22703</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5;"&gt;I am working on&amp;nbsp; a near analysis that determines the closest distance from a polygon layer to one of three other vector layers. The polygon layer relates to the three other layers using EO ID. When I determine the closest distance, I want to only be looking at records with the same EO ID. Here is the Python code that I came up with:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;# Copy the input feature class so the near fields can be added
arcpy.FeatureClassToFeatureClass_conversion(in_fc, out_path, out_name, subset_query)
out_fc = os.path.join(out_path, out_name)


# Create search cursor to loop though records in the output feature class
srows = arcpy.da.SearchCursor(out_fc, ["EO_ID"])


for srow in srows:
&amp;nbsp;&amp;nbsp;&amp;nbsp; # Convert eoid to an integer
&amp;nbsp;&amp;nbsp;&amp;nbsp; eoid = int(srow[0])
&amp;nbsp;&amp;nbsp;&amp;nbsp; # Create EO ID queries
&amp;nbsp;&amp;nbsp;&amp;nbsp; eoid_query = "{0} = {1}".format(eoid_field, eoid)
&amp;nbsp;&amp;nbsp;&amp;nbsp; sf_eoid_query = "EO_ID = {}".format(eoid)


&amp;nbsp;&amp;nbsp;&amp;nbsp; # Make feature layers using eoid queries
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.MakeFeatureLayer_management(out_fc, "out_lyr", eoid_query)
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.MakeFeatureLayer_management(src_1, "src1_lyr", sf_eoid_query)
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.MakeFeatureLayer_management(src_2, "src2_lyr", sf_eoid_query)
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.MakeFeatureLayer_management(src_3, "src3_lyr", sf_eoid_query)

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Run near analysis
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.Near_analysis("out_lyr", ["src1_lyr","src2_lyr","src3_lyr"])&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I run this code I get a PyScripter application error:&lt;/P&gt;&lt;P&gt;Access violation at address 56D0E49C in module 'FileGDB.dll'. Write of address B2689930.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I run the script in IDLE I get "pythonw.exe has stopped working"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks so much for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ArcGIS 10.2&lt;/P&gt;&lt;P&gt;Python 2.7&lt;/P&gt;&lt;P&gt;PyScripter 2.5.3x86 32 bit&lt;/P&gt;&lt;P&gt;Windows 7 64 bit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 14:06:39 GMT</pubDate>
    <dc:creator>KristenE</dc:creator>
    <dc:date>2021-12-11T14:06:39Z</dc:date>
    <item>
      <title>filegdb.dll error</title>
      <link>https://community.esri.com/t5/python-questions/filegdb-dll-error/m-p/293286#M22703</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5;"&gt;I am working on&amp;nbsp; a near analysis that determines the closest distance from a polygon layer to one of three other vector layers. The polygon layer relates to the three other layers using EO ID. When I determine the closest distance, I want to only be looking at records with the same EO ID. Here is the Python code that I came up with:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;# Copy the input feature class so the near fields can be added
arcpy.FeatureClassToFeatureClass_conversion(in_fc, out_path, out_name, subset_query)
out_fc = os.path.join(out_path, out_name)


# Create search cursor to loop though records in the output feature class
srows = arcpy.da.SearchCursor(out_fc, ["EO_ID"])


for srow in srows:
&amp;nbsp;&amp;nbsp;&amp;nbsp; # Convert eoid to an integer
&amp;nbsp;&amp;nbsp;&amp;nbsp; eoid = int(srow[0])
&amp;nbsp;&amp;nbsp;&amp;nbsp; # Create EO ID queries
&amp;nbsp;&amp;nbsp;&amp;nbsp; eoid_query = "{0} = {1}".format(eoid_field, eoid)
&amp;nbsp;&amp;nbsp;&amp;nbsp; sf_eoid_query = "EO_ID = {}".format(eoid)


&amp;nbsp;&amp;nbsp;&amp;nbsp; # Make feature layers using eoid queries
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.MakeFeatureLayer_management(out_fc, "out_lyr", eoid_query)
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.MakeFeatureLayer_management(src_1, "src1_lyr", sf_eoid_query)
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.MakeFeatureLayer_management(src_2, "src2_lyr", sf_eoid_query)
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.MakeFeatureLayer_management(src_3, "src3_lyr", sf_eoid_query)

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Run near analysis
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.Near_analysis("out_lyr", ["src1_lyr","src2_lyr","src3_lyr"])&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I run this code I get a PyScripter application error:&lt;/P&gt;&lt;P&gt;Access violation at address 56D0E49C in module 'FileGDB.dll'. Write of address B2689930.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I run the script in IDLE I get "pythonw.exe has stopped working"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks so much for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ArcGIS 10.2&lt;/P&gt;&lt;P&gt;Python 2.7&lt;/P&gt;&lt;P&gt;PyScripter 2.5.3x86 32 bit&lt;/P&gt;&lt;P&gt;Windows 7 64 bit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 14:06:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/filegdb-dll-error/m-p/293286#M22703</guid>
      <dc:creator>KristenE</dc:creator>
      <dc:date>2021-12-11T14:06:39Z</dc:date>
    </item>
  </channel>
</rss>

