JoeZirilli-8033 avatar image
0 Votes"
JoeZirilli-8033 asked JoeZirilli-8033 commented

Python Azure Function "Deployment Failed" with no error code provided

I am trying to deploy a Python Azure function and it always stops at the same point and I get 2 "Deployment Failed." messages.

8:34:55 AM bpanalyzeimage: /opt/Kudu/Scripts/ oryx build /tmp/zipdeploy/extracted -o /home/site/wwwroot --platform python --platform-version 3.8 -p packagedir=.python_packages/lib/site-packages
8:34:56 AM bpanalyzeimage: Deployment Failed.
8:35:02 AM bpanalyzeimage: Deployment failed.

I found this so I tried using different version of Python (3.7, 3.8, 3.9) but all of them get the same result.

Any idea what the issue is?

· 4
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@JoeZirilli-8033, Thanks for reaching out. Could you please help us in sharing the information below:
1. Which deployment method are you using to deploy this python function app?
2. If you are following any document/article to deploy your function app to share, could you help us with that?
3. Are you using any starter scripts in your code? If yes, could you please share them as well.

0 Votes 0 ·

Thank you for responding so quickly.

  1. I am using VSCode Azure and in FUNCTIONS I select "Deploy to Function App..." then "Create New Function App in Azure..."

  2. No

  3. I have the out-of-the-box scripts I used to build the HelloWorld function which works fine.

             "version": "2.0.0",
             "tasks": [
                     "type": "func",
                     "command": "host start",
                     "problemMatcher": "$func-python-watch",
                     "isBackground": true,
                     "dependsOn": "pip install (functions)"
                     "label": "pip install (functions)",
                     "type": "shell",
                     "osx": {
                         "command": "${config:azureFunctions.pythonVenv}/bin/python -m pip install -r requirements.txt"
                     "windows": {
                         "command": "${config:azureFunctions.pythonVenv}\\Scripts\\python -m pip install -r requirements.txt"
                     "linux": {
                         "command": "${config:azureFunctions.pythonVenv}/bin/python -m pip install -r requirements.txt"
                     "problemMatcher": []

0 Votes 0 ·

@JoeZirilli-8033, Thanks for your response. From my end I could see that currently that function app is deleted. I would suggest you create the function app first through the Azure portal. Once it is created, you can select the existing app in the VScode and then deploy the code. This is to identify whether the resource deployment is getting failed or the code deployment is failing.

0 Votes 0 ·

I did what you asked and now I have a new error. Here is the output window:

 8:02:54 AM AnalyzeImageBP: Starting deployment...
 8:03:11 AM AnalyzeImageBP: Creating zip package...
 8:41:54 AM AnalyzeImageBP: Zip package size: 15.3 MB
 8:41:53 AM AnalyzeImageBP: Fetching changes.
 8:41:54 AM AnalyzeImageBP: Cleaning up temp folders from previous zip deployments and extracting pushed zip file /tmp/zipdeploy/ (14.61 MB) to /tmp/zipdeploy/extracted
 8:41:54 AM AnalyzeImageBP: Offset to Central Directory cannot be held in an Int64.
 8:42:26 AM AnalyzeImageBP: Deployment failed.

How do I fix this?

0 Votes 0 ·

0 Answers