I have 40+ LAS Datasets (.lasd) that I am attempting to convert to rasters.

Here is my code:

import arcpy
import os
arcpy.env.workspace =r'F:\Shorelas'
arcpy.env.overwriteOutput = True
env = r'F:\Shorelas'
for x in os.listdir(r'F:\Shorelas'):
    if x[-4:] == "lasd":

It creates the first raster then throws this error:

Traceback (most recent call last):
  File "<string>", line 254, in run_nodebug
  File "C:\Users\Dave\Desktop\lastoraster.py", line 10, in <module>
  File "C:\Program Files (x86)\ArcGIS\Desktop10.3\ArcPy\arcpy\conversion.py", line 2522, in LasDatasetToRaster
    raise e
arcgisscripting.ExecuteError: ERROR 999999: Error executing function.
Failed to execute (LasDatasetToRaster).

Not sure whats wrong with my code

  • 1
    does x[:11] exist? Note that you're making it a GRID which may cause issues with length of name... you're only allowed 13 characters, no spaces, no punctuation and cannot start with a number.. give it a shot with x[:11] + '.tif' and see if that helps. Mar 1, 2017 at 2:47
  • yes x[:11] exists, I will give your recommendation a shot
    – Krizzle
    Mar 1, 2017 at 2:50
  • 1
    Is it locked by the filesystem? it could be an error in removing/overwriting. Have you set arcpy.env.overwriteOutput = True? If you delete a GRID with explorer without removing the info directory as well it can foul up the workspace... it's best to remove a GRID with ArcCatalog to ensure it's done properly; if you've viewed the GRID in ArcCatalog and moved on it could still be locked.. later versions of ArcGis seem to hold onto locks a lot longer than they're required. Mar 1, 2017 at 2:55
  • 2
    It sounds like the temporary raster is filling up your (quota of) your system drive or your current workspace. Do you know how to change this to another disc? How much free space is on (your quota of) your system drive? Do you have another disc to process temporary files to? Mar 1, 2017 at 3:32
  • 2
    What is environment extent setting?
    – FelixIP
    Mar 1, 2017 at 5:00


Browse other questions tagged or ask your own question.