Opened 3 years ago
Closed 3 years ago
#34407 closed Cleanup/optimization (fixed)
Report faulty file when some static file has non-utf-8 encoding
| Reported by: | Claude Paroz | Owned by: | Claude Paroz |
|---|---|---|---|
| Component: | contrib.staticfiles | Version: | dev |
| Severity: | Normal | Keywords: | |
| Cc: | Triage Stage: | Ready for checkin | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
When running collectstatic and one of the file is not encoded in UTF-8, the post_process method raises:
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xfc in position 41998: invalid start byte without any clue about the wrong file. It would be nice to report which file produced the error.
Change History (5)
comment:1 by , 3 years ago
| Triage Stage: | Unreviewed → Accepted |
|---|
comment:2 by , 3 years ago
| Owner: | changed from to |
|---|---|
| Status: | new → assigned |
comment:4 by , 3 years ago
| Triage Stage: | Accepted → Ready for checkin |
|---|
Note:
See TracTickets
for help on using tickets.
Agreed, we could improve an error message.