Erreur (exception au lieu de message) si fichier image invalide #280
viennet
commented 2022-01-15 11:00:12 +01:00
Owner
```
[2022-01-14 15:04:56,094] cedric requested https://scodoc.xxx.fr/ScoDoc/logos/signature_chef_gc/small?global_if_not_found=False
ERROR: Exception on /ScoDoc/logos/signature_chef_gc/small [GET]
Referrer: https://scodoc.xxx.fr/ScoDoc/configuration
Method: GET
Params: ImmutableMultiDict([('global_if_not_found', 'False')])
Traceback (most recent call last):
File "/opt/scodoc/venv/lib/python3.9/site-packages/PIL/JpegImagePlugin.py", line 629, in _save
rawmode = RAWMODE[im.mode]
KeyError: 'RGBA'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/opt/scodoc/venv/lib/python3.9/site-packages/flask/app.py", line 2073, in wsgi_app
response = self.full_dispatch_request()
File "/opt/scodoc/venv/lib/python3.9/site-packages/flask/app.py", line 1518, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/opt/scodoc/venv/lib/python3.9/site-packages/flask/app.py", line 1516, in full_dispatch_request
rv = self.dispatch_request()
File "/opt/scodoc/venv/lib/python3.9/site-packages/flask/app.py", line 1502, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
File "/opt/scodoc/venv/lib/python3.9/site-packages/flask_login/utils.py", line 272, in decorated_view
return func(*args, **kwargs)
File "/opt/scodoc/app/decorators.py", line 94, in decorated_function
return f(*args, **kwargs)
File "/opt/scodoc/app/views/scodoc.py", line 287, in get_logo_small
return _return_logo(
File "/opt/scodoc/app/views/scodoc.py", line 266, in _return_logo
im.save(stream, fmt)
File "/opt/scodoc/venv/lib/python3.9/site-packages/PIL/Image.py", line 2240, in save
save_handler(self, fp, filename)
File "/opt/scodoc/venv/lib/python3.9/site-packages/PIL/JpegImagePlugin.py", line 631, in _save
raise OSError(f"cannot write mode {im.mode} as JPEG") from e
OSError: cannot write mode RGBA as JPEG
```
viennet
added the 2022-01-15 11:00:18 +01:00
bug
label
viennet
closed this issue 2022-01-30 09:09:14 +01:00
Labels
No Label
ABS
à confirmer
API
Apogée
bug
BUT
Dev
duplicate
enhancement
Entreprises
frontend
help wanted
invalid
Jury
PE
prio
question
RGPD
Users
wontfix
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: ScoDoc/ScoDoc#280
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?