Open enricorotundo opened 5 years ago
The get_blob_to_stream
doc string specifies stream
param type as io.IOBase
but when stream
is io.StringIO
it fails.
The metod stream.write
(see below) is called by passing blob.content
which in my case is a bytes
object. That works when stream
is an instance of io.BytesIO
but fails when is instance of io.StringIO
because in the latter case the inherited write
method requires a string!
When Blob.content
could be str
instead of bytes
?
Hi @enricorotundo, thanks for reaching out!
I've logged this issue for further investigation. But upon a quick look, I think you have a really good point. We'll get back to you shortly.
Which service(blob, file, queue) does this issue concern?
Blob
Which version of the SDK was used? Please provide the output of
pip freeze
.What problem was encountered?
Fails with:
Even though accordin to the docs the stream param is an
io.IOBase
andissubclass(io.StringIO, io.IOBase)
isTrue
. Am I missing something?