Quantcast
Viewing latest article 36
Browse Latest Browse All 37

S3FS: TypeError: can't concat bytes to str

fs.S3fs seems to be not compatible with python 3 in the passing of prefix variable.

Here is my code(I am trying to list the directory of mybucket):

import fs.s3fsmyfs = fs.s3fs.S3FS(bucket, prefix, aws_access_ke, aws_secret_key)myfs.listdir()

It is producing an error in (fs/s3fs.py line 180) so I tried doing a:

prefix += chr(i%256).encode('utf-8') 

to fix it. But the error now goes to:

path = self._separator.join(iteratepath(path))

Viewing latest article 36
Browse Latest Browse All 37

Trending Articles