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

closed as off-topic by PolyGeo Sep 11 '17 at 8:02

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This problem cannot or can no longer be reproduced. Changes to the system or to the asker's circumstances may have rendered the question obsolete, or the question does not include a procedure to enable potential answerers to reproduce the same symptoms. Such questions are off-topic as they are unlikely to help future readers, but editing them to include more details can lead to re-opening." – PolyGeo
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 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. – Michael Stimson Mar 1 '17 at 2:47
  • yes x[:11] exists, I will give your recommendation a shot – Daykray Mar 1 '17 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. – Michael Stimson Mar 1 '17 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? – Michael Stimson Mar 1 '17 at 3:32
  • 2
    What is environment extent setting? – FelixIP Mar 1 '17 at 5:00