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

S3Boto3StorageFile's readlines always return bytes even if mode is set to rt #982

Closed
nl-emmanuellodovice opened this issue Feb 15, 2021 · 1 comment · Fixed by #1000
Closed

Comments

@nl-emmanuellodovice
Copy link

Sample code

with default_storage.open(path, 'rt') as file:
     print(file.readlines())

you get something like

[b'"Number","Name","Date","Datetime"']
@nl-emmanuellodovice nl-emmanuellodovice changed the title S3Boto3StorageFile does always return bytes even if mode is set to rt S3Boto3StorageFile always return bytes even if mode is set to rt Feb 15, 2021
@nl-emmanuellodovice nl-emmanuellodovice changed the title S3Boto3StorageFile always return bytes even if mode is set to rt S3Boto3StorageFile's readlines always return bytes even if mode is set to rt Feb 15, 2021
@heindrickdumdum0217
Copy link

I had the same issue.
Paramiko RSAKey depends on readlines function with mode 'r', but as it returns always bytes, it throws error.

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 a pull request may close this issue.

2 participants