Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions papermill/s3.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ def cat(
size = 0
bytes_read = 0
err = None
undecoded = ''
undecoded = b''
if key:
# try to read the file multiple times
for i in range(100):
Expand Down Expand Up @@ -317,8 +317,8 @@ def cat(

if encoding and not raw:
try:
decoded = undecoded + s.decode(encoding)
undecoded = ''
decoded = (undecoded + s).decode(encoding)
undecoded = b''
yield decoded
except UnicodeDecodeError:
undecoded += s
Expand Down