Why deployed a brand new Azure Functioin HttpTrigger but it still shows default HttpTrigger result?

Jeff Liu 91 Reputation points


I have deleted all Azure Functions app in my subscription. Then, I created a brand new HttpTrigger in Visual Studio Code but only changed some text in the func.HttpResponse to include my name in the Http responses.

But after I deployed it successfully into the runtime, I run it and the result was still the default HttpTrigger code result. Why?

I have been spent 3 hours figuring out what happened. Can you help me? You can reach me by Teams at <<Removed>> . Thank you very much. Jeff

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
3,713 questions
0 comments No comments
{count} votes

Accepted answer
  1. MayankBargali-MSFT 63,841 Reputation points

    @Jeff Liu Thanks for reaching out and offline discussion. As you are using requests module in your azure function and when there is a missing dependency, you should see the below error message in application insights that you have configured for your function app. In case if the changes are not saved correctly to your local file then the deployed code will not have the new changes.
    ModuleNotFoundError: No module named 'requests' looks like you have not installed the module requests.

    If you have any requirement where you need to use any other packages that are not predefined in the functions then you need to add the names or names along with versions of the required packages to the requirements.txt file. Please refer to this document for more details

    To troubleshoot these types of errors you can always refer to this document.

    Your requirement.txt file will be as below per the exception but in case if you are using any other packages then please make sure that you have defined the same.


    For your reference, I will suggest you to review this article which will can help you to monitor azure function. Once you have set it up you can see the above error in application insights. You can also see these exceptions in the storage account that you have configured on your function app.

    Please refer to Azure function python document to get more familiar with the development. Feel free to get back to us in Microsoft Q&A if you need any assistance in the future.

    0 comments No comments

0 additional answers

Sort by: Most helpful