Azure / aml-workspace

GitHub Action that allows you to create or connect to your Azure Machine Learning Workspace.
MIT License
22 stars 16 forks source link

exception while creating a new workspace #6

Closed ashishonce closed 4 years ago

ashishonce commented 4 years ago

when trying to create a new workspace and resource group, the code gives following exception

Traceback (most recent call last): File "/code/main.py", line 119, in main() File "/code/main.py", line 60, in main ws = Workspace.get( File "/usr/local/lib/python3.8/site-packages/azureml/core/workspace.py", line 479, in get result_dict = Workspace.list(subscription_id, auth=auth, resource_group=resource_group) File "/usr/local/lib/python3.8/site-packages/azureml/core/workspace.py", line 552, in list workspaces_list = Workspace._list_legacy(auth, subscription_id=subscription_id, File "/usr/local/lib/python3.8/site-packages/azureml/core/workspace.py", line 1101, in _list_legacy raise e File "/usr/local/lib/python3.8/site-packages/azureml/core/workspace.py", line 1094, in _list_legacy workspace_autorest_list = _commands.list_workspace(auth, subscription_id=subscription_id, File "/usr/local/lib/python3.8/site-packages/azureml/_project/_commands.py", line 397, in list_workspace resource_error_handling(response_exception, WORKSPACE + "s") File "/usr/local/lib/python3.8/site-packages/azureml/_base_sdk_common/common.py", line 338, in resource_error_handling raise ProjectSystemException("resource_type not found.".format(resource_type=resource_type)) azureml.exceptions._azureml_exception.ProjectSystemException: ProjectSystemException: Message: Workspaces not found. InnerException None ErrorResponse


"error": ***
    "message": "Workspaces not found."
***

Reason : when workspace doesn't exist the ProjectSystemException is raised. that would mean we should create the workspace, in that exception. but instead we raise the exception.

print(f"::error::Workspace authorizationfailed: {exception}") raise ProjectSystemException

marvinbuss commented 4 years ago

@ashishonce Can you please check whether the bug is fixed in the linked PR?

ashishonce commented 4 years ago

yes this issue should get fixed by this change.