WebApp:az webapp up -- AttributeError: 'ResourceNotFoundError' object has no attribute 'response'
See original GitHub issueThis is autogenerated. Please review and update as needed.
Describe the bug
Azure failed to install, saying something about the python 2to3 directory. I removed the sym link, cleaned up the install, ran it again without seeing that error. Then I logged in successfully. But, all I get is “Authorization” errors trying to launch the most basic Flask app (the app is mine and works locally). I created the resource/app service manually and tried to start the basic app again, and now I see this error. The exception raised while handling another exception still looks like it’s related to that botched attempt by Azure to install their version of python over my own, so I figured I’d send the feedback. Good luck!
Command Name
az webapp up
Errors:
The command failed with an unexpected error. Here is the traceback:
'ResourceNotFoundError' object has no attribute 'response'
Traceback (most recent call last):
File "/usr/local/Cellar/azure-cli/2.32.0/libexec/lib/python3.10/site-packages/azure/cli/command_modules/appservice/custom.py", line 3997, in webapp_up
create_app_service_plan(cmd, rg_name, plan, _is_linux, hyper_v=False, per_site_scaling=False, sku=sku,
File "/usr/local/Cellar/azure-cli/2.32.0/libexec/lib/python3.10/site-packages/azure/cli/command_modules/appservice/custom.py", line 1813, in create_app_service_plan
raise ResourceNotFoundError(err_msg)
azure.cli.core.azclierror.ResourceNotFoundError: App service environment 'myservice' not found in subscription.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/Cellar/azure-cli/2.32.0/libexec/lib/python3.10/site-packages/knack/cli.py", line 231, in invoke
cmd_result = self.invocation.execute(args)
File "/usr/local/Cellar/azure-cli/2.32.0/libexec/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 658, in execute
raise ex
File "/usr/local/Cellar/azure-cli/2.32.0/libexec/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 721, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
File "/usr/local/Cellar/azure-cli/2.32.0/libexec/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 713, in _run_job
return cmd_copy.exception_handler(ex)
File "/usr/local/Cellar/azure-cli/2.32.0/libexec/lib/python3.10/site-packages/azure/cli/command_modules/appservice/commands.py", line 38, in _ex_handler
raise ex
File "/usr/local/Cellar/azure-cli/2.32.0/libexec/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 692, in _run_job
result = cmd_copy(params)
File "/usr/local/Cellar/azure-cli/2.32.0/libexec/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 328, in __call__
return self.handler(*args, **kwargs)
File "/usr/local/Cellar/azure-cli/2.32.0/libexec/lib/python3.10/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
return op(**command_args)
File "/usr/local/Cellar/azure-cli/2.32.0/libexec/lib/python3.10/site-packages/azure/cli/command_modules/appservice/custom.py", line 4001, in webapp_up
if ex.response.status_code == 409: # catch 409 conflict when trying to create existing ASP in diff location
AttributeError: 'ResourceNotFoundError' object has no attribute 'response'
To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.
- Put any pre-requisite steps here…
az webapp up --resource-group {} --sku {} --name {} --app-service-environment {}
Expected Behavior
Environment Summary
macOS-11.4-x86_64-i386-64bit, Darwin 20.5.0
Python 3.10.1
Installer: HOMEBREW
azure-cli 2.32.0
Additional Context
Issue Analytics
- State:
- Created 2 years ago
- Comments:12 (6 by maintainers)
Top GitHub Comments
@StrawnSC Yep, if I remember correctly I think the issue I was having (when I ran into the nested unhandled exception) was I had not properly created an ASE. It was searching for an ASE “myservice” which didn’t exist, since the tutorial I was following for that step called the service “myservice”, and I had erroneously assumed it would just auto-create the “myservice” service.
@StrawnSC Agreed. That would be a little easier to decipher than nested raised exceptions. Thanks!