s3path icon indicating copy to clipboard operation
s3path copied to clipboard

glob is broken

Open avibrazil opened this issue 3 years ago • 1 comments

Following code doesn't work:

import s3path

s3=s3path.S3Path.from_uri('s3://bucket-name/folder1/folder2')

list(s3.glob('*pkl'))

Last part of error:

~/.local/lib/python3.10/site-packages/s3path.py in is_dir(self)
    664         if self.bucket and not self.key:
    665             return True
--> 666         return self._accessor.is_dir(self)
    667 
    668     def is_file(self):

AttributeError: '_NormalAccessor' object has no attribute 'is_dir'

Tested in s3path 0.3.2. I can't use 0.3.3 because it has other glob-thread-related bugs.

avibrazil avatar Feb 08 '22 14:02 avibrazil

Hi @avibrazil Sorry for the delay

Something is strange in your case. In all the versions our accessor class is not based on _NormalAccessor.

Can you create a unit test or something that I can reproduce the issue? in my environment (on 0.3.2 version and also the latest) I'm unable to reproduce this scenario

liormizr avatar Mar 10 '22 14:03 liormizr