You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
on line 90 of book.py file_stream = _convert_content_to_stream(file_content, self._file_type)
does not pass the encoding to use so when decode is used later it throws an decoding exception
it should maybe use the **keywords and pass it to the function like so file_stream = _convert_content_to_stream(file_content, self._file_type, **keywords)
to maybe something like the below. currently the file_content.decode is set to static 'utf-8'
def _convert_content_to_stream(file_content, file_type, **keywords):
io = manager.get_io(file_type)
encoding = keywords.get('encoding', 'utf-8')
if PY2:
io.write(file_content)
else:
if (isinstance(io, StringIO) and isinstance(file_content, bytes)):
content = file_content.decode(encoding)
The text was updated successfully, but these errors were encountered:
on line 90 of book.py
file_stream = _convert_content_to_stream(file_content, self._file_type)
does not pass the encoding to use so when decode is used later it throws an decoding exception
it should maybe use the **keywords and pass it to the function like so
file_stream = _convert_content_to_stream(file_content, self._file_type, **keywords)
to maybe something like the below. currently the file_content.decode is set to static 'utf-8'
The text was updated successfully, but these errors were encountered: