Hello everyone,
In some cases when I run the line to change the workspace, it does not work. Do variables find_workspace_path and replace_workspace_path need to include the feature dataset or only the connection path?
lyr.findAndReplaceWorkspacePath(find_workspace_path=lyr.workspacePath, replace_workspace_path=r"Database Connections\Esde8_WASDREAD.sde")
lyr.save():
It fails:
Python Error occurred
Layer: Unexpected error
ERROR: Layer: Unexpected error
ERROR:root:: Layer: Unexpected error
These are the values for find_workspace_path and replace_workspace_path:
SValve.lyr
feature class whole path: Database Connections\SQLInstance.sde\Sewer.SewerCollection\Sewer.SValve
find_workspace_path= C:\Users\mydesktop\AppData\Roaming\Esri\Desktop10.2\ArcCatalog\OracleInstance.sde
replace_workspace_path= Database Connections\SQLInstance.sde