-
Notifications
You must be signed in to change notification settings - Fork 38
Closed
Description
The example of the api docs for python looks like:
t800File = client.file("data://.my/robots/T-800.png").getFile()
but no matter how i try to save the response I keep getting errors.
if i try to read the response in order to write to a file, i get this error:
with open("test.png", "w") as f:
f.write(response.read())
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x89 in position 0: invalid start byte
if i try to save the response directly, i get this:
with open("test.png", "w") as f:
f.write(response)
TypeError: write() argument must be str, not _io.TextIOWrapper
Any help is appreciated.
Metadata
Metadata
Assignees
Labels
No labels