Unable to deploy python function to functionapp from vscode

akhil reddy 0 Reputation points
2024-01-23T04:44:24.41+00:00

I get the error "Malformed SCM_RUN_FROM_PACKAGE when uploading built content." I tried adding SCM_RUN_FROM_PACKAGE with a value of 1 to my configuration, but that didn't work and I found out that wasn't a valid setting. I then tried adding WEBSITE_RUN_FROM_PACKAGE with a value of 1 to my configuration and that setting saved, but I got the same error when I tried to deploy. Please help! I can't use my function apps at all.

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,678 questions
{count} votes

1 answer

Sort by: Most helpful
  1. SnehaAgrawal-MSFT 20,856 Reputation points
    2024-01-24T05:20:44.3466667+00:00

    @akhil reddy Thanks for reaching here! Could you please elaborate what error you are receiving?

    Suggest you to run the Azure Functions Diagnostics to quickly diagnose and solve function app problems.

    To identify the actual cause of your issue, you need to get the Python project files that run on your function app. If you don't have the project files on your local computer, you can get them in one of the following ways:

    • If the function app has a WEBSITE_RUN_FROM_PACKAGE app setting and its value is a URL, download the file by copying and pasting the URL into your browser.
    • If the function app has WEBSITE_RUN_FROM_PACKAGE and it's set to 1, go to https://<app-name>.scm.azurewebsites.net/api/vfs/data/SitePackages and download the file from the latest href URL.
    • If the function app doesn't have either of the preceding app settings, go to https://<app-name>.scm.azurewebsites.net/api/settings and find the URL under SCM_RUN_FROM_PACKAGE. Download the file by copying and pasting the URL into your browser.
    • If suggestions resolve the issue, go to https://<app-name>.scm.azurewebsites.net/DebugConsole and view the content under /home/site/wwwroot. Then refer this article which helps you to troubleshoot potential causes of this error by inspecting your function app's content, identifying the root cause, and resolving the specific issue. Let us know.
    0 comments No comments