Opened 6 years ago
Last modified 6 years ago
#7146 closed defect
vsis3: VSIFStatL only works with key with unicode character if ReadDir is run first. — at Initial Version
Reported by: | tveastman | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | 2.2.3 |
Component: | default | Version: | unspecified |
Severity: | normal | Keywords: | vsis3 VSIFstatL unicode |
Cc: | robert.coup@… |
Description
VSIFStatL()
doesn't work on this path:
>>> gdal.VSIStatL(u'/vsis3/public-bucket-gdal-vsis3-tests/b/\xfc.txt') None
However, it *does* work if the bucket has been cached using ReadDirRecursive()
first.
>>> gdal.ReadDirRecursive(u'/vsis3/public-bucket-gdal-vsis3-tests') ['a/', 'a/a.txt', 'b/', 'b/+.txt', 'b/_.txt', u'b/\xfc.txt'] >>> gdal.VSIStatL(u'/vsis3/public-bucket-gdal-vsis3-tests/b/\xfc.txt') <osgeo.gdal.StatBuf; proxy of <Swig Object of type 'StatBuf *' at 0x7f16f72c6cf0> >
In the interest of helping shake out some more of these /vsis3/
bugs, I'm creating a pytest
test suite that runs against a public (world readable) S3 bucket. I won't be able to keep it there forever, but I hope it's useful.
My test suite is at https://github.com/koordinates/gdal-vsis3-tests/
The bucket is called 'public-bucket-gdal-vsis3-tests'. You should be able to access it too.
I've also found that the VSIFOpenEx()
method can't open files with similarly weird name S3 keys. I'll be adding a test case for that and filing a bug tomorrow, but I'll let you know now in case you can look into it before I've documented it better.
Cheers!