<?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: Python error: &amp;quot;Method RasterFieldName does not exist&amp;quot; in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/python-error-amp-quot-method-rasterfieldname-does/m-p/48795#M1707</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Python is backslash sensitive.&amp;nbsp; Try:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;raster = "C:\\data_all\\AltLatGrids\\ArcGISGrids\\alb8__22"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;or &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;raster = r"C:\data_all\AltLatGrids\ArcGISGrids\alb8__22"&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 29 Jul 2010 13:50:12 GMT</pubDate>
    <dc:creator>GerryGabrisch</dc:creator>
    <dc:date>2010-07-29T13:50:12Z</dc:date>
    <item>
      <title>Python error: &amp;quot;Method RasterFieldName does not exist&amp;quot;</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/python-error-amp-quot-method-rasterfieldname-does/m-p/48794#M1706</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;BR /&gt;&lt;SPAN&gt;I'm trying to write a python script that will print the name of a raster dataset to screen. I copied the example code from the Desktop Help and changed the raster object to match the path to my dataset:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;import arcgisscripting&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;gp = arcgisscripting.create()&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;raster = "C:\data_all\AltLatGrids\ArcGISGrids\alb8__22"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Create a describe object&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;desc = gp.Describe(raster)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Print the RasterFieldName property&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;print desc.RasterFieldName&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When I ran the script I received the error message "Method RasterFieldName does not exist". I am using ArcGIS 9.3 with an ArcInfo license, and Python 2.5.4.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any help gratefully received!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Kate.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jul 2010 12:55:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/python-error-amp-quot-method-rasterfieldname-does/m-p/48794#M1706</guid>
      <dc:creator>KateParks</dc:creator>
      <dc:date>2010-07-29T12:55:41Z</dc:date>
    </item>
    <item>
      <title>Re: Python error: "Method RasterFieldName does not exist"</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/python-error-amp-quot-method-rasterfieldname-does/m-p/48795#M1707</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Python is backslash sensitive.&amp;nbsp; Try:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;raster = "C:\\data_all\\AltLatGrids\\ArcGISGrids\\alb8__22"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;or &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;raster = r"C:\data_all\AltLatGrids\ArcGISGrids\alb8__22"&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jul 2010 13:50:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/python-error-amp-quot-method-rasterfieldname-does/m-p/48795#M1707</guid>
      <dc:creator>GerryGabrisch</dc:creator>
      <dc:date>2010-07-29T13:50:12Z</dc:date>
    </item>
    <item>
      <title>Re: Python error: "Method RasterFieldName does not exist"</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/python-error-amp-quot-method-rasterfieldname-does/m-p/48796#M1708</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I tried both of those, but still get the same error.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Out of interest, what does the 'r' before your second suggestion do?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jul 2010 16:28:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/python-error-amp-quot-method-rasterfieldname-does/m-p/48796#M1708</guid>
      <dc:creator>KateParks</dc:creator>
      <dc:date>2010-07-29T16:28:15Z</dc:date>
    </item>
    <item>
      <title>Re: Python error: "Method RasterFieldName does not exist"</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/python-error-amp-quot-method-rasterfieldname-does/m-p/48797#M1709</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ah,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;RasterFieldName is not returning the name of the raster it returns the name of a field in a raster catalog.&amp;nbsp; See &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?id=1053&amp;amp;pid=980&amp;amp;topicname=Raster_Catalog_properties"&gt;http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?id=1053&amp;amp;pid=980&amp;amp;topicname=Raster_Catalog_properties&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Try this&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;import arcgisscripting&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;gp = arcgisscripting.create()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;raster = r"C:\Temp\lidar"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# Create a describe object&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;desc = gp.Describe(raster)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# Print the name of the raster&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;print desc.Name&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Backslashes are special characters, for example &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;print "Foo\nbar"&amp;nbsp; would print &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;foo&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;bar&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;to the screen.&amp;nbsp; The r sets the string to a raw string so r"Foo\nbar" would print &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Foo\nbar&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jul 2010 17:08:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/python-error-amp-quot-method-rasterfieldname-does/m-p/48797#M1709</guid>
      <dc:creator>GerryGabrisch</dc:creator>
      <dc:date>2010-07-29T17:08:18Z</dc:date>
    </item>
    <item>
      <title>Re: Python error: "Method RasterFieldName does not exist"</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/python-error-amp-quot-method-rasterfieldname-does/m-p/48798#M1710</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks a lot for your help, that works now.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Jul 2010 14:15:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/python-error-amp-quot-method-rasterfieldname-does/m-p/48798#M1710</guid>
      <dc:creator>KateParks</dc:creator>
      <dc:date>2010-07-30T14:15:04Z</dc:date>
    </item>
  </channel>
</rss>

