I run the following python script code in Notebook in ArcGIS Pro. It works.
arcpy.management.RebuildIndexes(input_database=database,include_system="NO_SYSTEM",in_datasets=dataset,delta_only="ALL")
But I run it in VS code:
arcpy.management.RebuildIndexes(input_database=database,include_system="NO_SYSTEM",in_datasets=dataset,delta_only="ALL")
I get error:
Failed to execute. Parameters are not valid.
ERROR 000837: The workspace is not the correct workspace type.
Failed to execute (RebuildIndexes).