【发布时间】:2021-02-22 20:27:09
【问题描述】:
我正在使用我的存储密钥测试 Azure 数据湖功能。当我尝试在容器中创建目录时,它把我抛到了异常之下。如何解决错误?
Python 代码:
import os, uuid, sys
from azure.storage.filedatalake import DataLakeServiceClient
from azure.core._match_conditions import MatchConditions
from azure.storage.filedatalake._models import ContentSettings
from azure.storage.blob import BlobServiceClient
global service_client
service_client = DataLakeServiceClient(account_url="{}://{}.dfs.core.windows.net".format(
"https", storage_account_name), credential=storage_account_key)
file_system_client = service_client.get_file_system_client(file_system="demo")
file_system_client.create_directory("demo-directory")
例外:
(AuthenticationFailed) Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.
RequestId:f3880178-801f-0073-2c58-09be43000000
Time:2021-02-22T20:22:15.9974202Z
【问题讨论】:
标签: python azure azure-data-lake azure-data-lake-gen2