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

Support S3 with Python3 #232

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

KyleJamesWalker
Copy link

Boto now supports python3, but this module doesn't when trying to access an s3 bucket with the following code:

from fs.opener import fsopendir
fsopendir('s3://my_bucket').listdir()
env/lib/python3.5/site-packages/fs-0.5.5a1-py3.5.egg/fs/s3fs.py in _s3path(self, path)
    177         path = relpath(normpath(path))
    178         path = self._separator.join(iteratepath(path))
--> 179         s3path = self._prefix + path
    180         if s3path and s3path[-1] == self._separator:
    181             s3path = s3path[:-1]

TypeError: can't concat bytes to str

Code now lists the files in the bucket just fine, I can only run unit tests on python 2.7.x (which pass with this change), I'm not able to run the tests on python 3 so I can't verify all cases when working with s3 files will work without making major modifications to the codebase.

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.

1 participant