<?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 ImportError: cannot import name CalculateGeometryAttributes in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/importerror-cannot-import-name/m-p/1064405#M61277</link>
    <description>&lt;P&gt;I am working on a script in PyCharm. When I run my set up lines:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;import &lt;/SPAN&gt;arcpy&lt;SPAN&gt;, &lt;/SPAN&gt;os&lt;BR /&gt;&lt;SPAN&gt;from &lt;/SPAN&gt;arcpy &lt;SPAN&gt;import &lt;/SPAN&gt;env&lt;BR /&gt;&lt;SPAN&gt;from &lt;/SPAN&gt;arcpy.management &lt;SPAN&gt;import &lt;/SPAN&gt;Delete&lt;SPAN&gt;, &lt;/SPAN&gt;Rename&lt;SPAN&gt;, &lt;/SPAN&gt;Copy&lt;SPAN&gt;, &lt;/SPAN&gt;CreateFileGDB&lt;SPAN&gt;, &lt;/SPAN&gt;CalculateGeometryAttributes&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;I get the following error:&amp;nbsp;&lt;/P&gt;&lt;P&gt;ImportError: cannot import name CalculateGeometryAttributes&lt;/P&gt;&lt;P&gt;I need the CalculateGeometryAttributes tool in the last step of the script, and my code was working fine before I added it in. I was able to import and use Delete, Rename, Copy, and CreateFileGDB from the Management toolbox without issue.&lt;/P&gt;&lt;P&gt;I can't figure out what I'm doing wrong here and why this tool in particular is not able to import. Any help would be appreciated!&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 02 Jun 2021 22:39:56 GMT</pubDate>
    <dc:creator>Linde_Carmack</dc:creator>
    <dc:date>2021-06-02T22:39:56Z</dc:date>
    <item>
      <title>ImportError: cannot import name CalculateGeometryAttributes</title>
      <link>https://community.esri.com/t5/python-questions/importerror-cannot-import-name/m-p/1064405#M61277</link>
      <description>&lt;P&gt;I am working on a script in PyCharm. When I run my set up lines:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;import &lt;/SPAN&gt;arcpy&lt;SPAN&gt;, &lt;/SPAN&gt;os&lt;BR /&gt;&lt;SPAN&gt;from &lt;/SPAN&gt;arcpy &lt;SPAN&gt;import &lt;/SPAN&gt;env&lt;BR /&gt;&lt;SPAN&gt;from &lt;/SPAN&gt;arcpy.management &lt;SPAN&gt;import &lt;/SPAN&gt;Delete&lt;SPAN&gt;, &lt;/SPAN&gt;Rename&lt;SPAN&gt;, &lt;/SPAN&gt;Copy&lt;SPAN&gt;, &lt;/SPAN&gt;CreateFileGDB&lt;SPAN&gt;, &lt;/SPAN&gt;CalculateGeometryAttributes&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;I get the following error:&amp;nbsp;&lt;/P&gt;&lt;P&gt;ImportError: cannot import name CalculateGeometryAttributes&lt;/P&gt;&lt;P&gt;I need the CalculateGeometryAttributes tool in the last step of the script, and my code was working fine before I added it in. I was able to import and use Delete, Rename, Copy, and CreateFileGDB from the Management toolbox without issue.&lt;/P&gt;&lt;P&gt;I can't figure out what I'm doing wrong here and why this tool in particular is not able to import. Any help would be appreciated!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Jun 2021 22:39:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/importerror-cannot-import-name/m-p/1064405#M61277</guid>
      <dc:creator>Linde_Carmack</dc:creator>
      <dc:date>2021-06-02T22:39:56Z</dc:date>
    </item>
    <item>
      <title>Re: ImportError: cannot import name CalculateGeometryAttributes</title>
      <link>https://community.esri.com/t5/python-questions/importerror-cannot-import-name/m-p/1064409#M61278</link>
      <description>&lt;P&gt;Can you use this function interface instead of trying to import it directly?&lt;/P&gt;&lt;LI-CODE lang="python"&gt;arcpy.CalculateGeometryAttributes_management()&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Jun 2021 23:05:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/importerror-cannot-import-name/m-p/1064409#M61278</guid>
      <dc:creator>nzjs</dc:creator>
      <dc:date>2021-06-02T23:05:01Z</dc:date>
    </item>
    <item>
      <title>Re: ImportError: cannot import name CalculateGeometryAttributes</title>
      <link>https://community.esri.com/t5/python-questions/importerror-cannot-import-name/m-p/1064411#M61279</link>
      <description>&lt;P&gt;Works for me... version of Pro?&lt;/P&gt;&lt;LI-CODE lang="python"&gt;from arcpy.management import CalculateGeometryAttributes
help(CalculateGeometryAttributes)

Help on function CalculateGeometryAttributes in module arcpy.management:

CalculateGeometryAttributes(in_features=None, geometry_property=None, length_unit=None, area_unit=None, coordinate_system=None, coordinate_format=None)
    CalculateGeometryAttributes_management(in_features, geometry_property;geometry_property..., {length_unit}, {area_unit}, {coordinate_system}, {coordinate_format})
 ... snip ...&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Jun 2021 23:02:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/importerror-cannot-import-name/m-p/1064411#M61279</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2021-06-02T23:02:35Z</dc:date>
    </item>
    <item>
      <title>Re: ImportError: cannot import name CalculateGeometryAttributes</title>
      <link>https://community.esri.com/t5/python-questions/importerror-cannot-import-name/m-p/1064541#M61280</link>
      <description>&lt;P&gt;Also check to see if you have this folder and it has files&lt;/P&gt;&lt;P&gt;C:\...Your_Install_folder...\Resources\ArcToolBox\toolboxes\Data Management Tools.tbx\CalculateGeometryAttributes.tool&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jun 2021 09:07:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/importerror-cannot-import-name/m-p/1064541#M61280</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2021-06-03T09:07:00Z</dc:date>
    </item>
    <item>
      <title>Re: ImportError: cannot import name CalculateGeometryAttributes</title>
      <link>https://community.esri.com/t5/python-questions/importerror-cannot-import-name/m-p/1064700#M61284</link>
      <description>&lt;P&gt;Thank you both for your ideas, I still was unable to resolve and ended up deciding to just use an update cursor instead, which is working nicely.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jun 2021 15:59:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/importerror-cannot-import-name/m-p/1064700#M61284</guid>
      <dc:creator>Linde_Carmack</dc:creator>
      <dc:date>2021-06-03T15:59:21Z</dc:date>
    </item>
  </channel>
</rss>

