AnsweredAssumed Answered

error in saving the TIF files in a separate directory

Question asked by sean.woznicki on Apr 15, 2015
Latest reply on Apr 15, 2015 by sean.woznicki

Hi Guys,

I am trying to convert more than 100 ascii files to raster using python code. All the lines (except Last two) in my code presented below is successfully converting Ascii to tif format in the working directory. However, I want to save the new TIF files in a separate directory. Therefore, the last two lines in my code, I am trying to save in a new directory. But, I am getting the below error:


"Traceback (most recent call last):

  File "C:\Subhasis\Project-Biological_monitoring\R_SAGA\Raster_data\", line 22, in <module>

AttributeError: 'Result' object has no attribute 'save'"


Thanks lot for your time and help!



import arcpy, os
from arcpy import env
from import *

#To overwrite output
arcpy.env.overwriteOutput = True

#set work environment
env.workspace = "C:/Subhasis/Project-Biological_monitoring/R_SAGA/Raster_data"



# Check out the ArcGIS Spatial Analyst extension license

for file in arcpy.ListFiles("*.asc"):
    outputraster = file.strip(".asc")+ ".tif"