Python Azure HTTP Function Call Returning 500 When I Include Finance Package Function

Josiah Swanson 1 Reputation point

Here's my main difficulty: even though the Finance Package works fine inside my Azure CronJob Function, when I try to make use of the same Package in an HTTP Function, I get an ambiguous 500 error response. It dawned on me that I need to either configure some sort of reverse proxy to accept responses or configure some gateway between outside websites and my function site. However, I'm not sure how to receive responses in the context of a Python Package function.
If it matters, I am trying to utilize yFinance (import yfinance). Yet, this same problem has cropped up in other ways, so I don't think it's limited to this package. My Function app is setup with a Consumption Plan.

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
3,999 questions
Azure Static Web Apps
Azure Static Web Apps
An Azure service that provides streamlined full-stack web app development.
698 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ryan Hill 24,301 Reputation points Microsoft Employee

    What you're doing is perfectly fine @Josiah Swanson . You can use req_body.getJson() to get the json representation of the payload and pull the property out that you want. As you can see below, I passed in

         "ticker": "MSFT"  

    and was able to log out ticker in both body and property form.