簡體   English   中英

Azure 函數 - Python - Visual Studio 代碼

[英]Azure Functions - Python - Visual Studio Code

我正在嘗試在 Azure Functions 中執行 Hello World 代碼。 我正在從 Visual Studio Code 調用 Azure 函數中的 python 代碼 - 博客存儲觸發器。

我沒有在 init.py 中做任何更改。 我收到以下錯誤:

Found Python version 3.8.0 (py).
Azure Functions Core Tools (3.0.2881 Commit hash: fa9641ad925588192888bc977ff****************)
Function Runtime Version: 3.0.14287.0
A host error has occurred during startup operation '7bad93bb-xxxx-4da0-9461-55fc9deaxxxx'.
System.Net.Http: Error while copying content to a stream. System.Net.Security:  Received an unexpected EOF or 0 bytes from the transport stream.  
Value cannot be null. (Parameter 'provider')
Application is shutting down...
The terminal process "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -Command .venv\Scripts\activate ; func host start" terminated with exit code: 1.

有關必須采取哪些措施來解決此問題的任何幫助? 謝謝。

由於您沒有更改代碼中的任何內容,因此您的函數在上傳到 azure 后應該可以工作。

該錯誤似乎與 tls 版本有關。

如果只是想簡單測試一下,可以直接在 Azure 上創建一個基於 python 的函數應用。

如果您使用 blob 觸發器,它實際上會將數據轉換為流。 因此,可以使用普通的python腳本進行模擬,只需在模擬完成后將其放入azure函數的函數體中即可。

另外,我還是希望你能把代碼和配置文件展示出來。 (如果沒有問題,在Azure上應該可以正常運行,問題應該是本地的。)

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM