An Azure service that stores unstructured data in the cloud as blobs.
How to fix ClientAuthenticationError when accessing the parquet (PyArrow) file through Blob Storage?
HI everyone
When I tried to build a blob client to access one .parquet file in Blob datastore with following script:
import os
from azure.storage.blob import BlobServiceClient
import pandas as pd
from io import BytesIO
connection_str = "*****"
container = "*****"
blob_path = "./source/****.parquet"
blob_service_client = BlobServiceClient.from_connection_string(connection_str)
blob_client = blob_service_client.get_blob_client(container = container, blob = blob_path)
stream_downloader = blob_client.download_blob() #error happened here
stream = BytesIO()
df = pd.read_parquet(stream, engine = 'pyarrow')
It showed the following error message for this step:
blob_client.download_blob()
ClientAuthenticationError: Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature. RequestId:* Time:2024-03-20T20:40:44.8529867Z ErrorCode:AuthenticationFailed authenticationerrordetail:The MAC signature found in the HTTP request '****' is not the same as any computed signature. Server used following string to sign: 'GET
Could someone have a clue about this? Thank you
Azure Blob Storage
1 answer
Sort by: Oldest
-
Deleted
This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.
2 deleted comments
Comments have been turned off. Learn more