<?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: arcpy CalculateGeometryAttributes and AddGeometryAttributes returning OSError: &amp;quot;data&amp;quot; does not exist in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/arcpy-calculategeometryattributes-and/m-p/1191633#M64989</link>
    <description>&lt;P&gt;thanks for the reply. to be clear, I did find the option to add code like you did above, but when formatting it inside the code editor, that was the pain. I got it where I wanted it and then when I submitted an error was thrown. I'll try it again, could have been user error, but not sure why there isn't just a simple markdown or other method to format. Tabs did not work at all either inside the editor. Oh well, like I said I'll try it out again, maybe I was too quick to dismiss.&lt;/P&gt;</description>
    <pubDate>Tue, 12 Jul 2022 17:31:13 GMT</pubDate>
    <dc:creator>jwhaney</dc:creator>
    <dc:date>2022-07-12T17:31:13Z</dc:date>
    <item>
      <title>arcpy CalculateGeometryAttributes and AddGeometryAttributes returning OSError: "data" does not exist</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-calculategeometryattributes-and/m-p/1191584#M64985</link>
      <description>&lt;P&gt;So I've posted this in gis stackexchange because I had an easier time with their code editor. Not sure if it's against rules to post a link to that post, but I'm gonna do it anyway...&lt;/P&gt;&lt;P&gt;&lt;A href="https://gis.stackexchange.com/questions/435800/arcpy-addgeometryattributes-and-calculategeometryattributes-return-traceback-ose" target="_blank"&gt;python 3 - ArcPy AddGeometryAttributes and CalculateGeometryAttributes return Traceback OSError: "data" does not exist - Geographic Information Systems Stack Exchange&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Essentially I'm having a problem as in the title here. Not sure what's going on and could use some help troubleshooting. I'll post the error below, but if you'd like to see my code please use the link above since trying to paste the code neatly here is a nightmare.&lt;/P&gt;&lt;P&gt;Error:&lt;/P&gt;&lt;P&gt;12 error --- Traceback (most recent call last):&lt;BR /&gt;File "c:\program files\arcgis\pro\Resources\ArcToolbox\scripts\AddGeometryAttributes.py", line 396, in &amp;lt;module&amp;gt;&lt;BR /&gt;addGeomAtts = AddGeometryAttributes(fc, geomProperties, lUnit, aUnit, cs)&lt;BR /&gt;File "c:\program files\arcgis\pro\Resources\ArcToolbox\scripts\AddGeometryAttributes.py", line 30, in __init__&lt;BR /&gt;desc = arcpy.Describe(fc)&lt;BR /&gt;File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\__init__.py", line 1287, in Describe&lt;BR /&gt;return gp.describe(value, data_type)&lt;BR /&gt;File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing\_base.py", line 384, in describe&lt;BR /&gt;self._gp.Describe(*gp_fixargs(args, True)))&lt;BR /&gt;OSError: "WY_testing.gdb\blobs_exp" does not exist&lt;/P&gt;&lt;P&gt;Failed to execute (AddGeometryAttributes).&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jul 2022 15:42:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-calculategeometryattributes-and/m-p/1191584#M64985</guid>
      <dc:creator>jwhaney</dc:creator>
      <dc:date>2022-07-12T15:42:23Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy CalculateGeometryAttributes and AddGeometryAttributes returning OSError: "data" does not exist</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-calculategeometryattributes-and/m-p/1191591#M64986</link>
      <description>&lt;P&gt;try this&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/python-blog/code-formatting-the-community-version/ba-p/1007633" target="_blank"&gt;Code formatting ... the Community Version - Esri Community&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jul 2022 16:04:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-calculategeometryattributes-and/m-p/1191591#M64986</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2022-07-12T16:04:30Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy CalculateGeometryAttributes and AddGeometryAttributes returning OSError: "data" does not exist</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-calculategeometryattributes-and/m-p/1191595#M64987</link>
      <description>&lt;P&gt;The code editor here isn't too bad... Try using the full path to the dataset for that method:&amp;nbsp; rf'x:\..\..\..\&lt;/P&gt;&lt;P&gt;{blobs_exp}'&lt;/P&gt;&lt;LI-CODE lang="python"&gt;def blob_creator(self, parcels_out, blob_size, blobs_out, blobs_exp): 
    print('12 --- blob creator started') 
    try:
        # the following is run successfully
        arcpy.analysis.Buffer(parcels_out, blobs_out, '25 Feet', 'FULL', 'ROUND', 'ALL') 
        
        if arcpy.Exists(blobs_out): 
            # run multipart to singlpart to separate unique blobs; this is successful
            arcpy.management.MultipartToSinglepart(blobs_out, blobs_exp) 
            # the following successfully prints out 'blobs_exp' feature count after it is created
            print('blobs_exp feature count:', arcpy.management.GetCount(blobs_exp)) 
          
            if arcpy.Exists(blobs_exp): 
                # the following is accessed after passing truthy exists 
                arcpy.management.AddField(blobs_exp, 'acreage_calc', 'DOUBLE') 
                # the following successfully accesses 'blobs_exp' via Describe 
                desc = arcpy.Describe(blobs_exp) 
                print('blobs_exp datatype:', desc.dataType) 

                # the following fails 
                arcpy.management.AddGeometryAttributes(blobs_exp, 'AREA', '', 'ACRES') 
                # the following commented out code also failed with same error 
                #arcpy.management.CalculateGeometryAttributes(blobs_exp, [["acreage_calc", "AREA_GEODESIC"]], '', area_unit="ACRES") 

            else: 
                sys.exit('12 --- could not find exploded blobs') 

        else: 
            sys.exit('12 --- could not find blobs poly') except Exception as e: print('12 error ---', e)

    except Exception as e:
        print('12 error ---', e)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jul 2022 16:17:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-calculategeometryattributes-and/m-p/1191595#M64987</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2022-07-12T16:17:48Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy CalculateGeometryAttributes and AddGeometryAttributes returning OSError: "data" does not exist</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-calculategeometryattributes-and/m-p/1191606#M64988</link>
      <description>&lt;P&gt;It looks like the Add Geometry Attributes expects a different input. (without the variable, or, variable set to string of feature class)&lt;/P&gt;&lt;P&gt;Does this work for you?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;arcpy.env.workspace = r"\\path\to\FGDB.gdb"     # Set to database holding the blobs_exp feature class
arcpy.AddGeometryAttributes_management("blobs_exp",'AREA', '', 'ACRES')&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;R_&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jul 2022 16:32:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-calculategeometryattributes-and/m-p/1191606#M64988</guid>
      <dc:creator>RhettZufelt</dc:creator>
      <dc:date>2022-07-12T16:32:13Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy CalculateGeometryAttributes and AddGeometryAttributes returning OSError: "data" does not exist</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-calculategeometryattributes-and/m-p/1191633#M64989</link>
      <description>&lt;P&gt;thanks for the reply. to be clear, I did find the option to add code like you did above, but when formatting it inside the code editor, that was the pain. I got it where I wanted it and then when I submitted an error was thrown. I'll try it again, could have been user error, but not sure why there isn't just a simple markdown or other method to format. Tabs did not work at all either inside the editor. Oh well, like I said I'll try it out again, maybe I was too quick to dismiss.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jul 2022 17:31:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-calculategeometryattributes-and/m-p/1191633#M64989</guid>
      <dc:creator>jwhaney</dc:creator>
      <dc:date>2022-07-12T17:31:13Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy CalculateGeometryAttributes and AddGeometryAttributes returning OSError: "data" does not exist</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-calculategeometryattributes-and/m-p/1191635#M64990</link>
      <description>&lt;P&gt;thanks, I did use the code editor you specify in that link, I just think that code editor stinks.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jul 2022 17:39:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-calculategeometryattributes-and/m-p/1191635#M64990</guid>
      <dc:creator>jwhaney</dc:creator>
      <dc:date>2022-07-12T17:39:05Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy CalculateGeometryAttributes and AddGeometryAttributes returning OSError: "data" does not exist</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-calculategeometryattributes-and/m-p/1191639#M64991</link>
      <description>&lt;P&gt;But, did either of the posts get you what you needed?&lt;/P&gt;&lt;P&gt;also, this forum tends to throws errors when posting quite a bit, and for no reason.&amp;nbsp; When that happens, you can normally hit the preview button a time or two until the error goes away, then post.&lt;/P&gt;&lt;P&gt;R_&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jul 2022 17:48:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-calculategeometryattributes-and/m-p/1191639#M64991</guid>
      <dc:creator>RhettZufelt</dc:creator>
      <dc:date>2022-07-12T17:48:07Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy CalculateGeometryAttributes and AddGeometryAttributes returning OSError: "data" does not exist</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-calculategeometryattributes-and/m-p/1191642#M64992</link>
      <description>&lt;P&gt;I'm looking into your suggestion about how arcpy might want a string input rather than a variable for this tool, but I haven't had any resolution yet. I'm still testing.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jul 2022 17:53:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-calculategeometryattributes-and/m-p/1191642#M64992</guid>
      <dc:creator>jwhaney</dc:creator>
      <dc:date>2022-07-12T17:53:09Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy CalculateGeometryAttributes and AddGeometryAttributes returning OSError: "data" does not exist</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-calculategeometryattributes-and/m-p/1191650#M64993</link>
      <description>&lt;P&gt;To provides some additional info, this is where user input is provided and you can see the &lt;STRONG&gt;out_workspace&lt;/STRONG&gt; variable is where I'm getting the path to the project gdb. I've tried changing this text input adding the 'r' and only having the gdb name with file ext and that's how the 11 methods before this one all worked fine, so I just don't know. &lt;STRONG&gt;Everything is run from the root directory&lt;/STRONG&gt; and I haven't had any issues until now.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;from prepare import Prep
from process import Proc


if __name__ == "__main__":
    # Input the abbreviation for the state you want to process.
    in_state = "WY"
    # This epsg code is meant to be the best projection for the entire state, usually a UTM zone or a custom state projection.
    # If you aren't sure which epsg code to use, stick with NAD83 GCS ('4269') or you can try leaving a blank string ''.
    epsg = "4269"
    # The wetlands_gdb path below may need to be altered if the shared drive file structure changes.
    wetlands_gdb = "..\\..\\..\\DATA\\USFWS\\National_Wetlands_Inventory\\20220524_By_State\\{}_geodatabase_wetlands\\{}_geodatabase_wetlands.gdb".format(in_state, in_state)
    # Your local project file geodatabase. Include '.gdb' in string.
    out_workspace = r".\\WY_testing.gdb"
    blob_size = 500
    #prep = Prep(in_state, epsg, wetlands_gdb, out_workspace)
    proc = Proc(out_workspace, blob_size)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And this is the Proc class with just the method I'm having issues with:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import os, sys
import arcpy

class Proc():
    def __init__(self, out_workspace, blob_size):
        self.work = out_workspace
        self.blob_size = blob_size
        arcpy.env.workspace = self.work
        self.fc_list = arcpy.ListFeatureClasses()
        self.parcels = [f for f in self.fc_list if 'parcels_over20' in f][0]
        self.subs = [f for f in self.fc_list if 'subs_inservice' in f][0]
        self.boundary = [f for f in self.fc_list if 'boundary' in f][0]
        self.wetlands = [f for f in self.fc_list if 'Wetlands' in f][0]
        self.nlcd_vector = [f for f in self.fc_list if 'nlcd_vector' in f][0]
        self.subs_buff_out = '{}\\subs_buff_poly'.format(self.work)
        self.parcels_buff_out = '{}\\parcels_over20_buffselect'.format(self.work)
        self.blobs_out = 'blobs'
        self.blobs_exp = 'blobs_exp'
        
        self.blob_creator(
            self.work, self.parcels_buff_out, self.blob_size, self.blobs_out, self.blobs_exp
        )

    # 12 --- create blobs with acreage_calc and removes any less than 'blob_size'
    def blob_creator(self, work, parcels_out, blob_size, blobs_out, blobs_exp):
        print('12 --- blob creator started')
        # below this does successfully print
        if arcpy.Exists(work):
            print('gdb does exist!')

        try:
            arcpy.env.workspace = work
            arcpy.analysis.Buffer(parcels_out, blobs_out, '25 Feet', 'FULL', 'ROUND', 'ALL')
            
            if arcpy.Exists(blobs_out):
                # run multipart to singlpart to separate unique blobs
                arcpy.management.MultipartToSinglepart(blobs_out, blobs_exp)
                print('blobs_exp feature count:', arcpy.management.GetCount(blobs_exp))

                if arcpy.Exists(blobs_exp):
                    arcpy.management.Delete(blobs_out)
                    arcpy.management.AddField(blobs_exp, 'acreage_calc', 'DOUBLE')
                    
                    desc = arcpy.Describe(blobs_exp)
                    print('blobs_exp datatype:', desc.dataType)

                    arcpy.management.AddGeometryAttributes("{}".format(blobs_exp), 'AREA_GEODESIC', '', 'ACRES')

                else:
                    sys.exit('12 --- could not find exploded blobs')

            else:
                sys.exit('12 --- could not find blobs poly')

        except Exception as e:
            print('12 error ---', e)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jul 2022 18:14:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-calculategeometryattributes-and/m-p/1191650#M64993</guid>
      <dc:creator>jwhaney</dc:creator>
      <dc:date>2022-07-12T18:14:57Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy CalculateGeometryAttributes and AddGeometryAttributes returning OSError: "data" does not exist</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-calculategeometryattributes-and/m-p/1191660#M64994</link>
      <description>&lt;P&gt;What do you get if you put these statements right before the AddGeometry.....?&lt;/P&gt;&lt;LI-CODE lang="python"&gt;print(arcpy.env.workspace)
print("{}".format(blobs_exp))  # From your code
print('"{}"'.format(blobs_exp))  # added ' to get double quotes around replacement&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Should report the full path to the database.&lt;/P&gt;&lt;P&gt;also, should return just the dataset name for the second one.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Documentation shows it with quotes around it, but the print of you code doesn't.&amp;nbsp; Don't think this has anything to do with it, but the third print statement adds the double quotes in case it needs it.&lt;/P&gt;&lt;P&gt;Main thing is to see what the workspace and blogs_exp resolve to right before the AddGeometry....&lt;/P&gt;&lt;P&gt;R_&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jul 2022 18:30:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-calculategeometryattributes-and/m-p/1191660#M64994</guid>
      <dc:creator>RhettZufelt</dc:creator>
      <dc:date>2022-07-12T18:30:49Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy CalculateGeometryAttributes and AddGeometryAttributes returning OSError: "data" does not exist</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-calculategeometryattributes-and/m-p/1191663#M64995</link>
      <description>&lt;P&gt;&lt;STRONG&gt;edited: &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;printing the workspace prints exactly what is stored in the out_worskpace variable, "WY_testing.gdb" which is in root directory same as this script. in other words is a relative path, or that's what I'm going for. arcpy hasn't had any problems with this relative path so far, but does this tool need a full path?&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jul 2022 18:38:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-calculategeometryattributes-and/m-p/1191663#M64995</guid>
      <dc:creator>jwhaney</dc:creator>
      <dc:date>2022-07-12T18:38:06Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy CalculateGeometryAttributes and AddGeometryAttributes returning OSError: "data" does not exist</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-calculategeometryattributes-and/m-p/1191669#M64996</link>
      <description>&lt;P&gt;Not sure on that one, I've been just testing on the console so have coded the path the the FGDB.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would replace it with the full path and see if it works.&lt;/P&gt;&lt;P&gt;Also, testing in Pro python window, it seems I can either set the workspace, then the name of the feature class, OR, I can use the full path to the feature class in the AddGeom.... tool and it works.&lt;/P&gt;&lt;P&gt;R_&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jul 2022 19:06:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-calculategeometryattributes-and/m-p/1191669#M64996</guid>
      <dc:creator>RhettZufelt</dc:creator>
      <dc:date>2022-07-12T19:06:53Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy CalculateGeometryAttributes and AddGeometryAttributes returning OSError: "data" does not exist</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-calculategeometryattributes-and/m-p/1191716#M64998</link>
      <description>&lt;P&gt;Use your python IDE and copy and paste is the easiest.&amp;nbsp; It isn't really a substitute for an IDE, ... it should be called a code repository if anything&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jul 2022 21:58:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-calculategeometryattributes-and/m-p/1191716#M64998</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2022-07-12T21:58:01Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy CalculateGeometryAttributes and AddGeometryAttributes returning OSError: "data" does not exist</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-calculategeometryattributes-and/m-p/1191842#M65000</link>
      <description>&lt;P&gt;From what I gathered for your &lt;EM&gt;out_workspace&lt;/EM&gt; you have written the name of the geodatabase instead of the path to it. I think that is why it returns an error that it does not exists. Try writing the path to it like this&amp;nbsp;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/environment-settings/current-workspace.htm" target="_blank"&gt;Current Workspace (Environment setting)—ArcGIS Pro | Documentation&lt;/A&gt;&amp;nbsp; hopefully it should solve the problem.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2022 12:05:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-calculategeometryattributes-and/m-p/1191842#M65000</guid>
      <dc:creator>KalinaStoycheva</dc:creator>
      <dc:date>2022-07-13T12:05:58Z</dc:date>
    </item>
  </channel>
</rss>

