IndexError raised from get_thumbnail_representation
- [ ] I have checked that the SDK documentation doesn't solve my issue.
- [ ] I have checked that the API documentation doesn't solve my issue.
- [ ] I have searched the Box Developer Forums and my issue isn't already reported (or if it has been reported, I have attached a link to it, for reference).
- [ ] I have searched Issues in this repo and my issue isn't already reported.
Description of the Issue
If a file is old and has no representations or if you ask for dimensions that are not available, the SDK crashes with an index error. It assumes there will always be at least one representation returned.
Steps to Reproduce
Included unit test in patch that shows the error if you pass unexpected dimensions
Expected Behavior
0 bytes returned
Error Message, Including Stack Trace
url = representation[0]['content']['url_template']
E IndexError: list index out of range
Screenshots
Versions Used
Python SDK: 2.12 Python: 3.7
Hi @DaveSawyer ,
Thanks for submitting this Issue! We will address it in our next sprint (SDK-1677)!
@PJSimon
Great! I look forward to switching from the thumbnail API to the representations API in the next release of Box Drive
This issue has been automatically marked as stale because it has not been updated in the last 30 days. It will be closed if no further activity occurs within the next 7 days. Feel free to reach out or mention Box SDK team member for further help and resources if they are needed.
This issue has been automatically closed due to maximum period of being stale. Thank you for your contribution to Box Python SDK and feel free to open another PR/issue at any time.