1

I want to split a shapefile by certain attribute and then apply a symbology layer, finally output it as a KMZ file.

R1 = outpath + 'R1.lyr'

arcpy.MakeFeatureLayer_management(fc, R1, "WHERE CAUSE")

arcpy.ApplySymbologyFromLayer_management(R1, symbologyLayer)

arcpy.LayerToKML_conversion(R1,outpath+'R1.kmz')

It raised error: arcgisscripting.ExecuteError: Failed to execute. Parameters are not valid. ERROR 000732: Input Layer: Dataset R1 does not exist or is not supported Failed to execute (ApplySymbologyFromLayer).

1

Here is a basic explanation on this error - This occurs even though the data clearly does exist on disk.

Cause Most often this is due to the input data path being entered incorrectly, as in the following situations:

• Misspelled folder names

• Using backslashes instead of forward slashes

• Having spaces in the path names

If the data clearly does exist, then the problem may be one of two known limits. See the Solution section for details.

Solution or Workaround Check the data path used, correct it as required and run the tool again.

If the data does exist, one of the following may be occurring:

If the input is a geodatabase feature class or table, an invalid subtype may exist on the dataset. To fix it, go to the feature class properties, then click the Subtypes tab and re-enter the default subtype code. If the default is zero (0), then click the cell with 0 and re-enter that same value. Apply the change by clicking the OK button. The dataset should now be usable. If the tool is being run on UNIX or Linux and the input is a text file that is being used as input to a tool with an input table parameter, such as CopyRows or MakeXYEventLayer, this is a known limit. On the Windows operating system the text file is represented as a table using a module,which is not available on UNIX or Linux. Change the data frame coordinate system to match the data being exported. If applicable, turn off live database connections at the layer level, and not just the subgroup. Turn off background processing. In ArcCatalog: Geoprocessing > Geoprocessing option > Clear Enable under Background Processing.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.