You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.
Forum Discussion
katec3
4 years agoExplorer | Level 3
Python 3 files_download JPEG. Get UnicodeDecodeError
Using Python 3.8 I can successfully download a JPEG image. However, I want to access the exif information so am trying to use Pillow to open it. Whatever I try I get the following error: 'UnicodeDeco...
- 4 years ago
The Python open method expects a path-like object in order to open a file, but your file_stream is the response.content, which is already the actual file data, not a path-like object. You can use it directly without calling open.
As for using Pillow, I can't offer help for that as it's not made by Dropbox, but it looks like there's an example in the requests documentation that may be helpful here.
Greg-DB
Dropbox Staff
The Python open method expects a path-like object in order to open a file, but your file_stream is the response.content, which is already the actual file data, not a path-like object. You can use it directly without calling open.
As for using Pillow, I can't offer help for that as it's not made by Dropbox, but it looks like there's an example in the requests documentation that may be helpful here.
katec3
4 years agoExplorer | Level 3
Thank you very much Greg, the link you sent solved it!
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,910 PostsLatest Activity: 4 days agoIf you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!