-
Notifications
You must be signed in to change notification settings - Fork 977
Closed
Description
When getting a report through DownloadReportAsString
or DownloadReport
, _DownloadReport
is called. This method call _DownloadReportAsStream
and read it chunk by chunk. The chunk size cannot be changed and it happens that, sometimes, the chunk end up right in the middle of and utf8 multibytes datablock.
I get an error while _DownloadReport
tries to decode that chunk; it raises 'utf-8' codec can't decode byte 0xc3 in position 16383: unexpected end of data
.
This problem breaks DownloadReportAsString
which is annoying since "as string" could mean "as a single chunk".
I, myself, did a workaround where I use DownloadReportAsStream().read().decode()
.
Anyway I see several way of fixing that problem :
- making the chunk size a parameters of the
_DownloadReport
method and makeDownloadReportAsString
pass -1 or 0 or whatever makesread()
read the whole thing in one time - make the chunk size a class attribute
- make the non-stream method use another download method than the stream one
I'd be glad to propose a patch for that.
Metadata
Metadata
Assignees
Labels
No labels