繁体   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