learningequality / learningequality/studio
Setting a channel thumbnail as an SVG via ricecooker breaks publishing
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 191
- Forks
- 307
- Avg merge
- 5d 6h
- Merged PRs (30d)
- 10
Description
❌ This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.
This seemed to have been caused by using an SVG image as the thumbnail for a channel. It's possible this would impact other thumbnails too. Ideally, setting as an SVG would be fine, and it would just be appropriately converted to a PNG on publish.
Sentry Issue: STUDIO-HV3
UnidentifiedImageError: cannot identify image file <File: /tmp/tmp8glzgicl>
(3 additional frame(s) were not displayed)
...
File "contentcuration/viewsets/channel.py", line 528, in publish
channel = publish_channel(
File "contentcuration/utils/publish.py", line 935, in publish_channel
set_channel_icon_encoding(channel)
File "contentcuration/utils/publish.py", line 759, in set_channel_icon_encoding
channel.icon_encoding = convert_channel_thumbnail(channel)
File "contentcuration/utils/publish.py", line 779, in convert_channel_thumbnail
return get_thumbnail_encoding(channel.thumbnail)
File "contentcuration/utils/files.py", line 112, in get_thumbnail_encoding
with Image.open(inbuffer) as image:
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with contentcuration/utils/files.py at get_thumbnail_encoding, then follow the publish path through contentcuration/utils/publish.py and contentcuration/viewsets/channel.py. Reproduce the channel-thumbnail publish failure with an SVG and verify that SVG thumbnails are converted appropriately before encoding, while checking whether other thumbnails are affected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100