Azure-Samples / Azure-Samples/digital-twins-samples
Fail to deploy the published functions (zip file) to my Azure function app
- Dominant language
- C#
- Stars
- 127
- Forks
- 92
- PR merge metrics
- No merged PRs in 30d
Description
**Command:**
az functionapp deployment source config-zip --resource-group myResourceGroup --name myFunctionApp --src "./publish.zip"
**Error output:**
Getting scm site credentials for zip deployment
The command failed with an unexpected error. Here is the traceback:
'str' object has no attribute 'value'
Traceback (most recent call last):
File "/opt/az/lib/python3.6/site-packages/knack/cli.py", line 231, in invoke
cmd_result = self.invocation.execute(args)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 657, in execute
raise ex
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 720, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 691, in _run_job
result = cmd_copy(params)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 328, in __call__
return self.handler(*args, **kwargs)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
return op(**command_args)
File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/appservice/custom.py", line 405, in enable_zip_deploy_functionapp
return enable_zip_deploy(cmd, resource_group_name, name, src, timeout, slot)
File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/appservice/custom.py", line 417, in enable_zip_deploy
scm_url = _get_scm_url(cmd, resource_group_name, name, slot)
File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/appservice/custom.py", line 1948, in _get_scm_url
webapp = show_webapp(cmd, resource_group_name, name, slot=slot)
File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/appservice/custom.py", line 607, in show_webapp
return _show_app(cmd, resource_group_name, name, "webapp", slot)
File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/appservice/custom.py", line 736, in _show_app
"Unable to find {} '{}', in RG '{}'".format(cmd_app_type.value, name, resource_group_name),
AttributeError: 'str' object has no attribute 'value'
To open an issue, please run: 'az feedback'
I didn't change any code in the AdtSampleApp\SampleFunctionsApp, how to fix this error? Thank you very much.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the az functionapp deployment source config-zip command and review the traceback in azure/cli/command_modules/appservice/custom.py, especially enable_zip_deploy_functionapp, _get_scm_url, and show_webapp. Done means the published functions deploy to the Azure Function App without the 'str' object has no attribute 'value' error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, csharp
- Domain
- cloud
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100