我正尝试在我的Mac上本地运行Azure函数,并收到以下错误:The binding type(s) 'blobTrigger' are not registered. Please ensure the type is correct and the binding extension is installed.
我正在使用Python 3.6.8,并且已经使用自制软件(brew tap azure/functions; brew install azure-functions-core-tools)安装了azure-functions-core-tools。
使用预期的配置设置我的local.settings.json文件,因此函数应该侦听托管在azure中的正确存储容器。
我敢肯定,自从上周开始工作以来,我没有更改任何代码或配置文件。
host.json文件包含:
{
"version": "2.0",
"extensionBundle": {
"id": "Microsoft.Azure.Functions.ExtensionBundle",
"version": "[1.*, 2.0.0)"
}
}function.json文件包含:
{
"scriptFile": "__init__.py",
"bindings": [
{
"name": "xmlblob",
"type": "blobTrigger",
"direction": "in",
"path": "<directory>/{name}",
"connection": "AzureStorageAccountConnectionString"
}
]
}requirements.txt文件包含:
azure-cosmos==3.1.0
azure-functions-worker==1.0.0b6
azure-storage==0.36.0
azure-storage-blob==2.0.1
xmljson==0.2.0
xmlschema==1.0.11然后,我在我的终端中运行以下命令:
1) pip install -r requirements.txt
2) source .env/bin/activate
3) func host start然后,我得到以下错误:
<Application name>: The binding type(s) 'blobTrigger' are not registered. Please ensure the type is correct and the binding extension is installed.发布于 2020-02-18 23:56:53
从外观上看,您已经正确地完成了所有工作,但是您需要在本地安装dotnet核心框架和运行时,以便执行触发器。
在Ubuntu上,我关注的是this guide。安装后,我可以在本地触发blob函数。
对于Mac,我会在take a look here上安装dotnot core。
发布于 2020-07-08 20:39:22
我得到这个错误是因为它下载并缓存的捆绑包有问题。除了错误消息之外,在日志的前面还有一个关于无法加载扩展包的警告,在前面的几行日志中显示了加载扩展包的路径,比如C:\Users\AppData\Local\Temp\Functions\ExtensionBundles\Microsoft.Azure.Functions.ExtensionBundle.我删除了ExtensionBundles文件夹,并重新下载了它。
发布于 2019-06-06 14:09:46
确保您已经安装了Microsoft.Azure.WebJobs.Extensions.Storage nuget包。

如果您从portal执行此操作,则会提示您安装扩展。

https://stackoverflow.com/questions/56393293
复制相似问题