Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MimeType is None for BMP files #27

Open
ITS-Luc opened this issue Nov 19, 2024 · 0 comments
Open

MimeType is None for BMP files #27

ITS-Luc opened this issue Nov 19, 2024 · 0 comments

Comments

@ITS-Luc
Copy link

ITS-Luc commented Nov 19, 2024

Hello,

When trying to use this engine with .bmp file, i get the following error :

2024-11-19 08:55:02 thumbor:ERROR ERROR: Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/thumbor/handlers/__init__.py", line 214, in get_image
    result = await self._fetch(self.context.request.image_url)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/thumbor/handlers/__init__.py", line 987, in _fetch
    raise fetch_result.exception
  File "/usr/local/lib/python3.12/site-packages/thumbor/handlers/__init__.py", line 955, in _fetch
    self.context.request.engine.load(fetch_result.buffer, extension)
  File "/usr/local/lib/python3.12/site-packages/thumbor_video_engine/engines/video.py", line 89, in load
    self.engine = self.get_engine(buffer, extension)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/thumbor_video_engine/engines/video.py", line 83, in get_engine
    elif mime.startswith('video/'):
         ^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'startswith'
2024-11-19 08:55:02 thumbor:ERROR [BaseHandler] get_image failed for url `default-bucket/e8c48d06-5c7e-4998-a9f0-75ec1f99ca02.bmp`. error: `'NoneType' object has no attribute 'startswith'`
2024-11-19 08:55:02 tornado.access:ERROR 500 GET /VPZcVOIm_bBHkM_JiKktKf91UlZAa87i2XWcoLLlMPY=/default-bucket/e8c48d06-5c7e-4998-a9f0-75ec1f99ca02.bmp (172.18.0.1) 53.39ms

i think it can be fixed easily, would it be possible to address this issue ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant