az functionapp deployment source config-zip fails with AttributeError: 'NoneType' object has no attribute 'lower'
See original GitHub issueUsing latest azure-cli I cannot deploy to a functionapp using cli locally. Update to latest azure-cli did not work as specified here: https://github.com/Azure/azure-cli/issues/10773
This is autogenerated. Please review and update as needed.
Describe the bug
Command Name
az functionapp deployment source config-zip
Errors:
The command failed with an unexpected error. Here is the traceback:
'NoneType' object has no attribute 'lower'
Traceback (most recent call last):
File "/opt/az/lib/python3.10/site-packages/knack/cli.py", line 231, in invoke
cmd_result = self.invocation.execute(args)
File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 663, in execute
raise ex
File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 726, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 697, in _run_job
result = cmd_copy(params)
File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 333, in __call__
return self.handler(*args, **kwargs)
File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
return op(**command_args)
File "/opt/az/lib/python3.10/site-packages/azure/cli/command_modules/appservice/custom.py", line 522, in enable_zip_deploy_functionapp
remove_remote_build_app_settings(cmd, resource_group_name, name, slot)
File "/opt/az/lib/python3.10/site-packages/azure/cli/command_modules/appservice/custom.py", line 645, in remove_remote_build_app_settings
value = keyval['value'].lower()
AttributeError: 'NoneType' object has no attribute 'lower'
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 functionapp deployment source config-zip --src {} --subscription {} --resource-group {} --name {}
Expected Behavior
Environment Summary
Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.31, Ubuntu 20.04 LTS
Python 3.10.4
Installer: DEB
azure-cli 2.37.0
Additional Context
`Issue Analytics
- State:
- Created a year ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Publish function succeeds but no function gets created
az functionapp deployment source config -zip -g <our_grp_name> -n myfnapp --src zipfile.zip ... AttributeError: 'NoneType' object has no attribute 'lower'.
Read more >GitHub Actions - Azure Function Apps zip deployment - ERROR
Azure Function App zip deployment: az functionapp deployment source config-zip. ... ERROR: 'str' object has no attribute 'value'
Read more >Django & Djoser 'NoneType' object has no attribute 'lower ...
Hey I got the same error while override Djoser's UserCreateSerializer. This solution works fine for me
Read more >azure-cli 2.16.0 - PyPI
az functionapp deployment source config -zip : Fixed an issue where config-zip could throw an exception on success on linux consumption (#15174).
Read more >ERROR: 'NoneType' object has no attribute 'lower'
we were able to work around by upgrading the worker VM with a new Azure CLI version and then using the OctopusDisableAzureCLI to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@markhoratiowalmsley Thank you for reaching out, we are looking into it.
@RakeshMohanMSFT
I reproduced the problem with the latest version: 2.41.0.
The functionapp as a deployment target is configured as follows:
WEBSITE-ENABLE_APP_SERVICE_STORAGE
in the appsettings totrue
, for deploying the app under/home
Please see the article https://learn.microsoft.com/en-us/azure/app-service/configure-custom-container?pivots=container-linux#configure-environment-variables
Functionapp services automatically replace the value of
DOCKER_REGISTRY_SERVER_*
in the appsettings withnull
, which is mapped toNone
in the Azure CLI.NoneType
object has no attributelower
in Python.Could you please reopen this issue?