Skip to content

Commit 6283f55

Browse files
authored
Fixed UnicodeDecodeError when fetching init scripts (#3103)
1 parent 7738c7c commit 6283f55

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/databricks/labs/ucx/assessment/clusters.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,8 @@ def _get_init_script_data(self, init_script_info: InitScriptInfo) -> str | None:
9595
return data
9696

9797
return None
98-
except (NotFound, BadRequest):
98+
except (NotFound, BadRequest, FileNotFoundError, UnicodeDecodeError) as e:
99+
logger.warning(f"Error reading {init_script_info}: {e}")
99100
return None
100101

101102
def _check_cluster_init_script(self, init_scripts: list[InitScriptInfo], source: str) -> list[str]:

0 commit comments

Comments
 (0)