Skip to content

Commit

Permalink
Fix error NoneType object is not subscriptable (Azure#38493)
Browse files Browse the repository at this point in the history
  • Loading branch information
fredms2 authored Nov 13, 2024
1 parent 7b18366 commit e95bc99
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def _from_rest_object(
if not rest_obj:
return None

workspace_object = Workspace._from_rest_object(rest_obj)
workspace_object = Workspace._from_rest_object(rest_obj, v2_service_context)
if workspace_object is not None:
return FeatureStore(
name=str(workspace_object.name),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -341,9 +341,13 @@ def _from_rest_object(

if hasattr(rest_obj, "ml_flow_tracking_uri"):
try:
from azureml.mlflow import get_mlflow_tracking_uri_v2
if v2_service_context:
# v2_service_context is required (not None) in get_mlflow_tracking_uri_v2
from azureml.mlflow import get_mlflow_tracking_uri_v2

mlflow_tracking_uri = get_mlflow_tracking_uri_v2(rest_obj, v2_service_context)
mlflow_tracking_uri = get_mlflow_tracking_uri_v2(rest_obj, v2_service_context)
else:
mlflow_tracking_uri = rest_obj.ml_flow_tracking_uri
except ImportError:
mlflow_tracking_uri = rest_obj.ml_flow_tracking_uri
error_msg = (
Expand Down

0 comments on commit e95bc99

Please sign in to comment.