Skip to content

HttpResponseError: The value for one of the HTTP headers is not in the correct format. #40041

Open
@mrpowerus

Description

@mrpowerus
  • Package Name: azure-storage-file-share
  • Package Version: 12.21.0
  • Operating System: Ubuntu 22.04.4 LTS
  • Python Version: Python 3.11

Describe the bug
Calling dir_client.list_directories_and_files() raises the following error:

HttpResponseError: The value for one of the HTTP headers is not in the correct format.
RequestId:52722ac6-601a-0038-552a-9372f3000000
Time:2025-03-12T08:42:20.7636612Z
ErrorCode:InvalidHeaderValue
headername:x-ms-version
headervalue:2025-05-05
Content: <?xml version="1.0" encoding="utf-8"?><Error><Code>InvalidHeaderValue</Code><Message>The value for one of the HTTP headers is not in the correct format.
RequestId:52722ac6-601a-0038-552a-9372f3000000
Time:2025-03-12T08:42:20.7636612Z</Message><HeaderName>x-ms-version</HeaderName><HeaderValue>2025-05-05</HeaderValue></Error>

File /databricks/python/lib/python3.11/site-packages/azure/core/paging.py:123, in ItemPaged.__next__(self)
    122     self._page_iterator = itertools.chain.from_iterable(self.by_page())
--> 123 return next(self._page_iterator)
File /databricks/python/lib/python3.11/site-packages/azure/core/paging.py:75, in PageIterator.__next__(self)
     74 try:
---> 75     self._response = self._get_next(self.continuation_token)
     76 except AzureError as error:
File /local_disk0/.ephemeral_nfs/cluster_libraries/python/lib/python3.11/site-packages/azure/storage/fileshare/_models.py:1022, in DirectoryPropertiesPaged._get_next_cb(self, continuation_token)
   1021 except HttpResponseError as error:
-> 1022     process_storage_error(error)
File /local_disk0/.ephemeral_nfs/cluster_libraries/python/lib/python3.11/site-packages/azure/storage/fileshare/_shared/response_handlers.py:186, in process_storage_error(storage_error)
    184 try:
    185     # `from None` prevents us from double printing the exception (suppresses generated layer error context)
--> 186     exec("raise error from None")   # pylint: disable=exec-used # nosec
    187 except SyntaxError as exc:
File <string>:1
HttpResponseError: The value for one of the HTTP headers is not in the correct format.
RequestId:52722ac6-601a-0038-552a-9372f3000000
Time:2025-03-12T08:42:20.7636612Z
ErrorCode:InvalidHeaderValue
headername:x-ms-version
headervalue:2025-05-05
Content: <?xml version="1.0" encoding="utf-8"?><Error><Code>InvalidHeaderValue</Code><Message>The value for one of the HTTP headers is not in the correct format.
RequestId:52722ac6-601a-0038-552a-9372f3000000
Time:2025-03-12T08:42:20.7636612Z</Message><HeaderName>x-ms-version</HeaderName><HeaderValue>2025-05-05</HeaderValue></Error>


To Reproduce
Steps to reproduce the behavior:

  1. Call the function list_directories_and_files() with the latest package.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

ClientThis issue points to a problem in the data-plane of the library.Service AttentionWorkflow: This issue is responsible by Azure service team.StorageStorage Service (Queues, Blobs, Files)customer-reportedIssues that are reported by GitHub users external to the Azure organization.issue-addressedWorkflow: The Azure SDK team believes it to be addressed and ready to close.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions