-
Notifications
You must be signed in to change notification settings - Fork 316
Closed
Description
I encounter parsing xml error when trying to using get_block_list
function.
Step to produce error
- Using azurite and run using docker hub
docker run -p 10000:10000 -p 10001:10001 -p 10002:10002 \ -v /tmp/azurite mcr.microsoft.com/azure-storage/azurite
- Run Using this code
will return:
use anyhow::Result; use azure_storage_blobs::prelude::{ClientBuilder, BlockListType}; #[tokio::main] pub async fn main() -> Result<()> { let client_container = ClientBuilder::emulator() .container_client("mycontainer"); client_container .create() .await .ok(); // Generate base64 string block id let block_id = "JGKOMgsURmnlQorQj"; client_container .blob_client("myblob") .put_block(block_id, b"Hello".to_vec()) .await?; let block_id = "JGKOMgsURxxxQorQj"; client_container .blob_client("myblob") .put_block(block_id, b"world".to_vec()) .await?; let res = client_container .blob_client("myblob") .get_block_list() .block_list_type(BlockListType::Uncommitted) .await?; println!("{:?}", res); Ok(()) }
Error: failed to deserialize the following xml into a azure_storage_blobs::blob::block_with_size_list::BlockList ml version="1.0" encoding="UTF-8" standalone="yes"?><BlockList><CommittedBlocks/><UncommittedBlocks><Block><Name>SkdLT01nc1VSbW5sUW9yUWo=</Name><Size>5</Size></Block><Block><Name>SkdLT01nc1VSeHh4UW9yUWo=</Name><Size>5</Size></Block></UncommittedBlocks></BlockList>
Metadata
Metadata
Assignees
Labels
No labels