Skip to content

S3Path.is_dir() returns False instead of raising error when no credentials are provided #502

@lagamura

Description

@lagamura

Using methods of an S3Path abstract object - created without authentication arguments, returns falsy value:

An S3Path object without authenticating arguments is created

from upath import UPath

s3_obj = UPath("s3://my-bucket/my-dir/")
s3_obj.is_dir()
>>False #thats misleading

s3_obj = UPath("s3://my-bucket/my-dir/", profile=<my_aws_profile>)
s3_obj.is_dir()
>>True

I would expect raising an Auth exception either when constructing the S3Path object, or when calling the is_dir() method attempted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentation 📘Improvements or additions to documentationquestion ❓Further information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions