Azure / azure-functions-python-worker

Python worker for Azure Functions.
http://aka.ms/azurefunctions
MIT License
335 stars 103 forks source link

Python program is not being executed after the Function App is triggered #1163

Closed J04N4 closed 1 year ago

J04N4 commented 1 year ago

I've built a python blob trigger function using VS code that is triggered when a file is added to a storage and then transforms the data of that file and inserts its content on a database . The function works fine locally and is deployed successfully on the Azure portal. However, when I insert files in storage, the function is triggered, but nothing happens (its file contents aren't added to the db). triggers

Requirements.txt

requirements

I already configured the variables manually in the azure portal in the settings of the Function App to match my json files.

application_settings

I use python 3.9, a linux consumption plan and a runtime ~4. I configured everything accordingly to the documentation. I don't understand why the function is not being executed

UPDATE: This seems to be the error I'm getting

error

That is how i configured the connection to the db in my code:

connectDB

The driver i use is "SQL server"

J04N4 commented 1 year ago

I was going to report an incident to Azure, but i found in the "Help + Support > | Configuration and Management" what it seems to be my issue.....

error
YunchuWang commented 1 year ago

@J04N4 thanks for sharing this and glad help support troubleshooting page pin out the issue for you, is the issue resolved?

J04N4 commented 1 year ago

@YunchuWang No. I tried switching the SQL server to ODBC Driver 13 for SQL Server like it is represented in my db connection string, but I still have the same error

bhagyshricompany commented 1 year ago

will check and update you soon

J04N4 commented 1 year ago

@bhagyshricompany It seems that the containers used for the Consumption (serverless) Function Apps has by default odbc driver 17 for sql server installed..... So I had to swap to it.

bhagyshricompany commented 1 year ago

@J04N4 yes closing it.