<?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: Arcgis10: Python error : RuntimeError : method datasetType does not exist in Transportation Questions</title>
    <link>https://community.esri.com/t5/transportation-questions/arcgis10-python-error-runtimeerror-method/m-p/537549#M1789</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Try setting your env.workspace&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
import arcpy
from arcpy import env

if __name__ == '__main__':
&amp;nbsp;&amp;nbsp;&amp;nbsp; env.workspace = 'c:/temp/python'

&amp;nbsp;&amp;nbsp;&amp;nbsp; zPath = "c:/temp/python/test.shp"
&amp;nbsp;&amp;nbsp;&amp;nbsp; print"toto"
&amp;nbsp;&amp;nbsp;&amp;nbsp; pDesc = arcpy.Describe(zPath)
&amp;nbsp;&amp;nbsp;&amp;nbsp; # error here RuntimeError: DescribeData: Method DatasetType does not exist
&amp;nbsp;&amp;nbsp;&amp;nbsp; print pDesc.DatasetType

&amp;nbsp;&amp;nbsp;&amp;nbsp; # and here
&amp;nbsp;&amp;nbsp;&amp;nbsp; pExtent = pDesc.Extent


&amp;nbsp;&amp;nbsp;&amp;nbsp; # and here
&amp;nbsp;&amp;nbsp;&amp;nbsp; print "Extent of shape :\nXMin: %f, YMin: %f, \nXMax: %f, YMax: %f" % \
&amp;nbsp;&amp;nbsp;&amp;nbsp; (pExtent.XMin,pExtent.YMin,pExtent.XMax,pExtent.YMax)

&amp;nbsp;&amp;nbsp;&amp;nbsp; # and here
&amp;nbsp;&amp;nbsp;&amp;nbsp; pSr = pDesc.spatialReference

&amp;nbsp;&amp;nbsp;&amp;nbsp; print pSr.name
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You should get something like:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;C:\Temp\Python&amp;gt;python test.py&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;toto&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;FeatureClass&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Extent of shape :&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;XMin: 1727760.654081, YMin: 657671.252142,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;XMax: 1733764.605903, YMax: 662427.894069&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;NAD_1983_StatePlane_Tennessee_FIPS_4100_Feet&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;C:\Temp\Python&amp;gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 23:20:16 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2021-12-11T23:20:16Z</dc:date>
    <item>
      <title>Arcgis10: Python error : RuntimeError : method datasetType does not exist</title>
      <link>https://community.esri.com/t5/transportation-questions/arcgis10-python-error-runtimeerror-method/m-p/537548#M1788</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I develop python script with eclipse. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;When i run the code under eclipse ou&amp;nbsp; with the dos command line ), i get the error "function not found"... &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This code runs well under the python console of arccatalog&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I set the PYTHONPATH with the arcgis 10 bin an arccpy directories .. no issue !!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Please Help !!! je craque !!!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My code : &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;import arcpy&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;if __name__ == '__main__':&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; zPath = "c:/test.shp"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print"toto"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; pDesc = arcpy.Describe(zPath) &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#&amp;nbsp;&amp;nbsp;&amp;nbsp; error here RuntimeError: DescribeData: Method DatasetType does not exist&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print pDesc.DatasetType&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# and here&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; pExtent = pDesc.Extent&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# and here&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print "Extent of shape :\nXMin: %f, YMin: %f, \nXMax: %f, YMax: %f" % \&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (pExtent.XMin,pExtent.YMin,pExtent.XMax,pExtent.YMax) &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# and here&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; pSr = pDesc.spatialReference&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print pSr.name&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Feb 2011 09:47:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/arcgis10-python-error-runtimeerror-method/m-p/537548#M1788</guid>
      <dc:creator>XavierMauclaire</dc:creator>
      <dc:date>2011-02-01T09:47:31Z</dc:date>
    </item>
    <item>
      <title>Re: Arcgis10: Python error : RuntimeError : method datasetType does not exist</title>
      <link>https://community.esri.com/t5/transportation-questions/arcgis10-python-error-runtimeerror-method/m-p/537549#M1789</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Try setting your env.workspace&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
import arcpy
from arcpy import env

if __name__ == '__main__':
&amp;nbsp;&amp;nbsp;&amp;nbsp; env.workspace = 'c:/temp/python'

&amp;nbsp;&amp;nbsp;&amp;nbsp; zPath = "c:/temp/python/test.shp"
&amp;nbsp;&amp;nbsp;&amp;nbsp; print"toto"
&amp;nbsp;&amp;nbsp;&amp;nbsp; pDesc = arcpy.Describe(zPath)
&amp;nbsp;&amp;nbsp;&amp;nbsp; # error here RuntimeError: DescribeData: Method DatasetType does not exist
&amp;nbsp;&amp;nbsp;&amp;nbsp; print pDesc.DatasetType

&amp;nbsp;&amp;nbsp;&amp;nbsp; # and here
&amp;nbsp;&amp;nbsp;&amp;nbsp; pExtent = pDesc.Extent


&amp;nbsp;&amp;nbsp;&amp;nbsp; # and here
&amp;nbsp;&amp;nbsp;&amp;nbsp; print "Extent of shape :\nXMin: %f, YMin: %f, \nXMax: %f, YMax: %f" % \
&amp;nbsp;&amp;nbsp;&amp;nbsp; (pExtent.XMin,pExtent.YMin,pExtent.XMax,pExtent.YMax)

&amp;nbsp;&amp;nbsp;&amp;nbsp; # and here
&amp;nbsp;&amp;nbsp;&amp;nbsp; pSr = pDesc.spatialReference

&amp;nbsp;&amp;nbsp;&amp;nbsp; print pSr.name
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You should get something like:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;C:\Temp\Python&amp;gt;python test.py&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;toto&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;FeatureClass&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Extent of shape :&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;XMin: 1727760.654081, YMin: 657671.252142,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;XMax: 1733764.605903, YMax: 662427.894069&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;NAD_1983_StatePlane_Tennessee_FIPS_4100_Feet&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;C:\Temp\Python&amp;gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 23:20:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/arcgis10-python-error-runtimeerror-method/m-p/537549#M1789</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-12-11T23:20:16Z</dc:date>
    </item>
    <item>
      <title>Re: Arcgis10: Python error : RuntimeError : method datasetType does not exist</title>
      <link>https://community.esri.com/t5/transportation-questions/arcgis10-python-error-runtimeerror-method/m-p/537550#M1790</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: Xavier&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes il should sir..&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I get this when i run the script from the arccatalog python console&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But i get this when i use the dos command line&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;toto&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;toto&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Traceback (most recent call last):&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; File "C:\Users\xmauclaire\Documents\Etudes\GeoDoc_DI104\Dev\Python\pygeodoc\src\Setbounds.py", line 24, in &amp;lt;module&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print pDesc.datasetType&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;RuntimeError: DescribeData: Method datasetType does not exist&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any idea ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;regards&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Feb 2011 14:07:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/arcgis10-python-error-runtimeerror-method/m-p/537550#M1790</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2011-02-01T14:07:15Z</dc:date>
    </item>
    <item>
      <title>Re: Arcgis10: Python error : RuntimeError : method datasetType does not exist</title>
      <link>https://community.esri.com/t5/transportation-questions/arcgis10-python-error-runtimeerror-method/m-p/537551#M1791</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Did you add/modify what I posted?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Primarly&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;from arcpy import env&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;env.workspace = 'c:/temp/python'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;zPath = "c:/temp/python/test.shp"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Set to your environment.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Feb 2011 15:15:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/arcgis10-python-error-runtimeerror-method/m-p/537551#M1791</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2011-02-01T15:15:04Z</dc:date>
    </item>
    <item>
      <title>Re: Arcgis10: Python error : RuntimeError : method datasetType does not exist</title>
      <link>https://community.esri.com/t5/transportation-questions/arcgis10-python-error-runtimeerror-method/m-p/537552#M1792</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: Xavier&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes sir i did that and got the same result !&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;On the other hand i can get defaults describe attributes (baseName, file etc) but not other specific attributes.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;if with the debuger i do a&amp;nbsp; hasattr(pDesc, "datasetType"), the answer is false...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;amazing isn't it ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;regards&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Feb 2011 15:25:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/arcgis10-python-error-runtimeerror-method/m-p/537552#M1792</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2011-02-01T15:25:56Z</dc:date>
    </item>
    <item>
      <title>Re: Arcgis10: Python error : RuntimeError : method datasetType does not exist</title>
      <link>https://community.esri.com/t5/transportation-questions/arcgis10-python-error-runtimeerror-method/m-p/537553#M1793</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Then I don't know. Two things I would try:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1) Add C:\Python26\ArcGIS10.0 to your system path and execute the .PY&amp;nbsp; the way I did.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;2) Put your code in a folder that does not contain spaces.&amp;nbsp; Something like C:\temp for testing.&amp;nbsp; Make it simple until you can figure out what's throwing the error.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You don't have multiple versions of Python your box do you?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Feb 2011 15:43:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/arcgis10-python-error-runtimeerror-method/m-p/537553#M1793</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2011-02-01T15:43:27Z</dc:date>
    </item>
    <item>
      <title>Re: Arcgis10: Python error : RuntimeError : method datasetType does not exist</title>
      <link>https://community.esri.com/t5/transportation-questions/arcgis10-python-error-runtimeerror-method/m-p/537554#M1794</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: Xavier&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The Path variable is ok&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm going to test your idea.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for all.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;regards&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Feb 2011 17:44:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/arcgis10-python-error-runtimeerror-method/m-p/537554#M1794</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2011-02-01T17:44:46Z</dc:date>
    </item>
  </channel>
</rss>

