Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Add support for abfss protocol #311

Merged
merged 1 commit into from
Nov 20, 2024
Merged

Fix: Add support for abfss protocol #311

merged 1 commit into from
Nov 20, 2024

Conversation

jslorrma
Copy link
Contributor

@jslorrma jslorrma commented Nov 14, 2024

Description

This pull request addresses the issue where defining a UPath with the Azure protocol "abfss" causes a ValueError:

File .../lib/python3.11/site-packages/upath/implementations/cloud.py:104, in AzurePath.__init__(self, protocol, *args, **storage_options)
    102 print(self.drive, len(self.parts))
    103 if not self.drive and len(self.parts) > 1:
--> 104     raise ValueError("non key-like path provided (bucket/container missing)")

ValueError: non key-like path provided (bucket/container missing)

This fixes #310

Fix

This pull request adds "abfss" to the WrappedFileSystemFlavour.protocol_config["netloc_is_anchor"] list to ensure that the splitdrive method correctly handles paths with the "abfss" protocol.

@ap--
Copy link
Collaborator

ap-- commented Nov 20, 2024

Thank you for your contribution @jslorrma ❤️

Some additional information and links:

AzureBlobFileSystem protocol registration seems to be a bit convoluted. Ultimately all three az, abfs, and abfss are registered.

@ap-- ap-- merged commit 635fa20 into fsspec:main Nov 20, 2024
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ValueError when defining an Azure UPath with protocol "abfss"
2 participants