[Bug]: best.jpg api call fails with internal server error #19924
-
Checklist
Describe the problem you are havingI often get an error when trying to receive the thumbnail for a label via best.jpg. The call is not always broken. Steps to reproduce
Version0.16.1-e664cb2 In which browser(s) are you experiencing the issue with?firefox, curl, .. Frigate config filemqtt:
host: x.x.x.x
detectors:
# cpu1:
# type: cpu
# num_threads: 3
ov:
type: openvino
device: AUTO
model_path: /openvino-model/ssdlite_mobilenet_v2.xml
model:
width: 300
height: 300
input_tensor: nhwc
input_pixel_format: bgr
labelmap_path: /openvino-model/coco_91cl_bkgr.txt
go2rtc:
streams:
camera_2:
- rtsp://xxx:[email protected]/stream1
webrtc:
candidates:
- x.x.x.x:8555
- stun:8555
cameras:
camera_2: # <------ Name the camera
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/camera_2
roles:
- detect
- rtmp
#input_args: -rtsp_transport tcp
input_args: preset-rtsp-restream
#hwaccel_args: preset-intel-qsv-h264
hwaccel_args: preset-vaapi
detect:
width: 1920 # <---- update for your camera's resolution
height: 1080 # <---- update for your camera's resolution
motion:
mask:
- 0.782,1,1,1,1,0,0.44,0
- 0,0.052,0.318,0.054,0.319,0.005,0.001,0.003
snapshots:
enabled: true
bounding_box: true
record:
enabled: true
retain:
days: 0
alerts:
retain:
days: 10
detections:
retain:
days: 10
objects:
track:
- person
- dog
- cat
version: 0.16-0
semantic_search:
enabled: true
reindex: false
model_size: large
detect:
enabled: truedocker-compose file or Docker CLI commandversion: "3.3"
services:
frigate:
container_name: frigate
privileged: true # this may not be necessary for all setups
restart: unless-stopped
#image: ghcr.io/blakeblackshear/frigate:stable
image: ghcr.io/blakeblackshear/frigate:stable
shm_size: 64mb # update for your cameras based on calculation above
volumes:
- /etc/localtime:/etc/localtime:ro
- config:/config/
- storage:/media/frigate
- type: tmpfs
target: /tmp/cache
ports:
- 5000:5000
- 1935:1935 # RTMP feeds
- 8554:8554 # RTSP feeds
- 8555:8555/tcp # WebRTC over tcp
- 8555:8555/udp # WebRTC over udp
- 1984:1984 # WEBRTC
environment:
FRIGATE_RTSP_PASSWORD: xxx
PLUS_API_KEY: xxx:xxx
S6_CMD_WAIT_FOR_SERVICES_MAXTIME: 60000
devices:
- /dev/dri:/dev/dri
# - "/dev/dri/renderD128:/dev/dri/renderD128"
group_add:
- 107
volumes:
config:
driver_opts:
type: nfs4
o: addr=x.x.x.x,rw
device: :/Frigate/config
storage:
driver_opts:
type: nfs4
o: addr=x.x.x.x,rw
device: :/Frigate/storageRelevant Frigate log output2025-09-05 10:23:18.511540918 x.x.x.x - - [05/Sep/2025:10:23:18 +0200] "GET /api/camera_2/person/best.jpg HTTP/1.1" 500 21 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:142.0) Gecko/20100101 Firefox/142.0" "-"
2025-09-05 10:23:18.519277393 ERROR: Exception in ASGI application
2025-09-05 10:23:18.519283567 + Exception Group Traceback (most recent call last):
2025-09-05 10:23:18.519286476 | File "/usr/local/lib/python3.11/dist-packages/starlette/_utils.py", line 76, in collapse_excgroups
2025-09-05 10:23:18.519288202 | yield
2025-09-05 10:23:18.519290555 | File "/usr/local/lib/python3.11/dist-packages/starlette/middleware/base.py", line 186, in __call__
2025-09-05 10:23:18.519292508 | async with anyio.create_task_group() as task_group:
2025-09-05 10:23:18.519294838 | File "/usr/local/lib/python3.11/dist-packages/anyio/_backends/_asyncio.py", line 772, in __aexit__
2025-09-05 10:23:18.519296308 | raise BaseExceptionGroup(
2025-09-05 10:23:18.519298278 | ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)
2025-09-05 10:23:18.519299901 +-+---------------- 1 ----------------
2025-09-05 10:23:18.519301523 | Traceback (most recent call last):
2025-09-05 10:23:18.519303794 | File "/usr/local/lib/python3.11/dist-packages/uvicorn/protocols/http/h11_impl.py", line 406, in run_asgi
2025-09-05 10:23:18.519305719 | result = await app( # type: ignore[func-returns-value]
2025-09-05 10:23:18.519307525 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-09-05 10:23:18.519309937 | File "/usr/local/lib/python3.11/dist-packages/uvicorn/middleware/proxy_headers.py", line 70, in __call__
2025-09-05 10:23:18.519311661 | return await self.app(scope, receive, send)
2025-09-05 10:23:18.519313318 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-09-05 10:23:18.519315705 | File "/usr/local/lib/python3.11/dist-packages/fastapi/applications.py", line 1054, in __call__
2025-09-05 10:23:18.519317463 | await super().__call__(scope, receive, send)
2025-09-05 10:23:18.519319750 | File "/usr/local/lib/python3.11/dist-packages/starlette/applications.py", line 113, in __call__
2025-09-05 10:23:18.519321519 | await self.middleware_stack(scope, receive, send)
2025-09-05 10:23:18.519323799 | File "/usr/local/lib/python3.11/dist-packages/starlette/middleware/errors.py", line 187, in __call__
2025-09-05 10:23:18.519325094 | raise exc
2025-09-05 10:23:18.519327393 | File "/usr/local/lib/python3.11/dist-packages/starlette/middleware/errors.py", line 165, in __call__
2025-09-05 10:23:18.519329216 | await self.app(scope, receive, _send)
2025-09-05 10:23:18.519331495 | File "/usr/local/lib/python3.11/dist-packages/starlette/middleware/base.py", line 185, in __call__
2025-09-05 10:23:18.519333287 | with collapse_excgroups():
2025-09-05 10:23:18.519335276 | File "/usr/lib/python3.11/contextlib.py", line 155, in __exit__
2025-09-05 10:23:18.519336948 | self.gen.throw(typ, value, traceback)
2025-09-05 10:23:18.519339265 | File "/usr/local/lib/python3.11/dist-packages/starlette/_utils.py", line 82, in collapse_excgroups
2025-09-05 10:23:18.519340646 | raise exc
2025-09-05 10:23:18.519343013 | File "/usr/local/lib/python3.11/dist-packages/starlette/middleware/base.py", line 187, in __call__
2025-09-05 10:23:18.519344945 | response = await self.dispatch_func(request, call_next)
2025-09-05 10:23:18.519346761 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-09-05 10:23:18.519349042 | File "/usr/local/lib/python3.11/dist-packages/slowapi/middleware.py", line 124, in dispatch
2025-09-05 10:23:18.519350685 | return await call_next(request)
2025-09-05 10:23:18.519352324 | ^^^^^^^^^^^^^^^^^^^^^^^^
2025-09-05 10:23:18.519354615 | File "/usr/local/lib/python3.11/dist-packages/starlette/middleware/base.py", line 163, in call_next
2025-09-05 10:23:18.519356115 | raise app_exc
2025-09-05 10:23:18.519358354 | File "/usr/local/lib/python3.11/dist-packages/starlette/middleware/base.py", line 149, in coro
2025-09-05 10:23:18.519360196 | await self.app(scope, receive_or_disconnect, send_no_error)
2025-09-05 10:23:18.519362508 | File "/usr/local/lib/python3.11/dist-packages/starlette/middleware/base.py", line 185, in __call__
2025-09-05 10:23:18.519364123 | with collapse_excgroups():
2025-09-05 10:23:18.519366112 | File "/usr/lib/python3.11/contextlib.py", line 155, in __exit__
2025-09-05 10:23:18.519367774 | self.gen.throw(typ, value, traceback)
2025-09-05 10:23:18.519370073 | File "/usr/local/lib/python3.11/dist-packages/starlette/_utils.py", line 82, in collapse_excgroups
2025-09-05 10:23:18.519371510 | raise exc
2025-09-05 10:23:18.519373834 | File "/usr/local/lib/python3.11/dist-packages/starlette/middleware/base.py", line 187, in __call__
2025-09-05 10:23:18.519375729 | response = await self.dispatch_func(request, call_next)
2025-09-05 10:23:18.519377518 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-09-05 10:23:18.519379612 | File "/opt/frigate/frigate/api/fastapi_app.py", line 89, in frigate_middleware
2025-09-05 10:23:18.519381219 | response = await call_next(request)
2025-09-05 10:23:18.519382812 | ^^^^^^^^^^^^^^^^^^^^^^^^
2025-09-05 10:23:18.519385128 | File "/usr/local/lib/python3.11/dist-packages/starlette/middleware/base.py", line 163, in call_next
2025-09-05 10:23:18.519386555 | raise app_exc
2025-09-05 10:23:18.519388927 | File "/usr/local/lib/python3.11/dist-packages/starlette/middleware/base.py", line 149, in coro
2025-09-05 10:23:18.519390755 | await self.app(scope, receive_or_disconnect, send_no_error)
2025-09-05 10:23:18.519393134 | File "/usr/local/lib/python3.11/dist-packages/starlette/middleware/base.py", line 185, in __call__
2025-09-05 10:23:18.519394810 | with collapse_excgroups():
2025-09-05 10:23:18.519396748 | File "/usr/lib/python3.11/contextlib.py", line 155, in __exit__
2025-09-05 10:23:18.519398331 | self.gen.throw(typ, value, traceback)
2025-09-05 10:23:18.519400631 | File "/usr/local/lib/python3.11/dist-packages/starlette/_utils.py", line 82, in collapse_excgroups
2025-09-05 10:23:18.519401983 | raise exc
2025-09-05 10:23:18.519404190 | File "/usr/local/lib/python3.11/dist-packages/starlette/middleware/base.py", line 187, in __call__
2025-09-05 10:23:18.519406053 | response = await self.dispatch_func(request, call_next)
2025-09-05 10:23:18.519407886 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-09-05 10:23:18.519410357 | File "/usr/local/lib/python3.11/dist-packages/starlette_context/middleware/context_middleware.py", line 78, in dispatch
2025-09-05 10:23:18.519411985 | response = await call_next(request)
2025-09-05 10:23:18.519413563 | ^^^^^^^^^^^^^^^^^^^^^^^^
2025-09-05 10:23:18.519415795 | File "/usr/local/lib/python3.11/dist-packages/starlette/middleware/base.py", line 163, in call_next
2025-09-05 10:23:18.519417135 | raise app_exc
2025-09-05 10:23:18.519419365 | File "/usr/local/lib/python3.11/dist-packages/starlette/middleware/base.py", line 149, in coro
2025-09-05 10:23:18.519421328 | await self.app(scope, receive_or_disconnect, send_no_error)
2025-09-05 10:23:18.519423676 | File "/usr/local/lib/python3.11/dist-packages/starlette/middleware/exceptions.py", line 62, in __call__
2025-09-05 10:23:18.519425785 | await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
2025-09-05 10:23:18.519428203 | File "/usr/local/lib/python3.11/dist-packages/starlette/_exception_handler.py", line 53, in wrapped_app
2025-09-05 10:23:18.519429647 | raise exc
2025-09-05 10:23:18.519432019 | File "/usr/local/lib/python3.11/dist-packages/starlette/_exception_handler.py", line 42, in wrapped_app
2025-09-05 10:23:18.519433629 | await app(scope, receive, sender)
2025-09-05 10:23:18.519435892 | File "/usr/local/lib/python3.11/dist-packages/starlette/routing.py", line 715, in __call__
2025-09-05 10:23:18.519437691 | await self.middleware_stack(scope, receive, send)
2025-09-05 10:23:18.519439922 | File "/usr/local/lib/python3.11/dist-packages/starlette/routing.py", line 735, in app
2025-09-05 10:23:18.519441550 | await route.handle(scope, receive, send)
2025-09-05 10:23:18.519443852 | File "/usr/local/lib/python3.11/dist-packages/starlette/routing.py", line 288, in handle
2025-09-05 10:23:18.519445568 | await self.app(scope, receive, send)
2025-09-05 10:23:18.519447673 | File "/usr/local/lib/python3.11/dist-packages/starlette/routing.py", line 76, in app
2025-09-05 10:23:18.519449746 | await wrap_app_handling_exceptions(app, request)(scope, receive, send)
2025-09-05 10:23:18.519452105 | File "/usr/local/lib/python3.11/dist-packages/starlette/_exception_handler.py", line 53, in wrapped_app
2025-09-05 10:23:18.519453440 | raise exc
2025-09-05 10:23:18.519455706 | File "/usr/local/lib/python3.11/dist-packages/starlette/_exception_handler.py", line 42, in wrapped_app
2025-09-05 10:23:18.519457438 | await app(scope, receive, sender)
2025-09-05 10:23:18.519459587 | File "/usr/local/lib/python3.11/dist-packages/starlette/routing.py", line 73, in app
2025-09-05 10:23:18.519461157 | response = await f(request)
2025-09-05 10:23:18.519462626 | ^^^^^^^^^^^^^^^^
2025-09-05 10:23:18.519464808 | File "/usr/local/lib/python3.11/dist-packages/fastapi/routing.py", line 301, in app
2025-09-05 10:23:18.519466534 | raw_response = await run_endpoint_function(
2025-09-05 10:23:18.519468198 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-09-05 10:23:18.519470620 | File "/usr/local/lib/python3.11/dist-packages/fastapi/routing.py", line 214, in run_endpoint_function
2025-09-05 10:23:18.519472399 | return await run_in_threadpool(dependant.call, **values)
2025-09-05 10:23:18.519474209 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-09-05 10:23:18.519476546 | File "/usr/local/lib/python3.11/dist-packages/starlette/concurrency.py", line 39, in run_in_threadpool
2025-09-05 10:23:18.519478366 | return await anyio.to_thread.run_sync(func, *args)
2025-09-05 10:23:18.519480206 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-09-05 10:23:18.519482436 | File "/usr/local/lib/python3.11/dist-packages/anyio/to_thread.py", line 56, in run_sync
2025-09-05 10:23:18.519484446 | return await get_async_backend().run_sync_in_worker_thread(
2025-09-05 10:23:18.519486311 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-09-05 10:23:18.519488795 | File "/usr/local/lib/python3.11/dist-packages/anyio/_backends/_asyncio.py", line 2476, in run_sync_in_worker_thread
2025-09-05 10:23:18.519490306 | return await future
2025-09-05 10:23:18.519491697 | ^^^^^^^^^^^^
2025-09-05 10:23:18.519493923 | File "/usr/local/lib/python3.11/dist-packages/anyio/_backends/_asyncio.py", line 967, in run
2025-09-05 10:23:18.519495550 | result = context.run(func, *args)
2025-09-05 10:23:18.519497133 | ^^^^^^^^^^^^^^^^^^^^^^^^
2025-09-05 10:23:18.519499197 | File "/opt/frigate/frigate/api/media.py", line 1601, in label_thumbnail
2025-09-05 10:23:18.519500923 | return event_thumbnail(request, event_id, 60)
2025-09-05 10:23:18.519502581 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-09-05 10:23:18.519551928 | File "/opt/frigate/frigate/api/media.py", line 938, in event_thumbnail
2025-09-05 10:23:18.519554577 | media_type=extension.get_mime_type(),
2025-09-05 10:23:18.519556291 | ^^^^^^^^^^^^^^^^^^^^^^^
2025-09-05 10:23:18.519558223 | AttributeError: 'int' object has no attribute 'get_mime_type'
2025-09-05 10:23:18.519559832 +------------------------------------
2025-09-05 10:23:18.519561004
2025-09-05 10:23:18.519562920 During handling of the above exception, another exception occurred:
2025-09-05 10:23:18.519564096
2025-09-05 10:23:18.519565673 Traceback (most recent call last):
2025-09-05 10:23:18.519568082 File "/usr/local/lib/python3.11/dist-packages/uvicorn/protocols/http/h11_impl.py", line 406, in run_asgi
2025-09-05 10:23:18.519569837 result = await app( # type: ignore[func-returns-value]
2025-09-05 10:23:18.519571567 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-09-05 10:23:18.519573819 File "/usr/local/lib/python3.11/dist-packages/uvicorn/middleware/proxy_headers.py", line 70, in __call__
2025-09-05 10:23:18.519575394 return await self.app(scope, receive, send)
2025-09-05 10:23:18.519576986 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-09-05 10:23:18.519579153 File "/usr/local/lib/python3.11/dist-packages/fastapi/applications.py", line 1054, in __call__
2025-09-05 10:23:18.519580834 await super().__call__(scope, receive, send)
2025-09-05 10:23:18.519583033 File "/usr/local/lib/python3.11/dist-packages/starlette/applications.py", line 113, in __call__
2025-09-05 10:23:18.519584801 await self.middleware_stack(scope, receive, send)
2025-09-05 10:23:18.519586986 File "/usr/local/lib/python3.11/dist-packages/starlette/middleware/errors.py", line 187, in __call__
2025-09-05 10:23:18.519588319 raise exc
2025-09-05 10:23:18.519590552 File "/usr/local/lib/python3.11/dist-packages/starlette/middleware/errors.py", line 165, in __call__
2025-09-05 10:23:18.519592218 await self.app(scope, receive, _send)
2025-09-05 10:23:18.519594369 File "/usr/local/lib/python3.11/dist-packages/starlette/middleware/base.py", line 185, in __call__
2025-09-05 10:23:18.519595838 with collapse_excgroups():
2025-09-05 10:23:18.519597770 File "/usr/lib/python3.11/contextlib.py", line 155, in __exit__
2025-09-05 10:23:18.519599304 self.gen.throw(typ, value, traceback)
2025-09-05 10:23:18.519601561 File "/usr/local/lib/python3.11/dist-packages/starlette/_utils.py", line 82, in collapse_excgroups
2025-09-05 10:23:18.519602848 raise exc
2025-09-05 10:23:18.519605111 File "/usr/local/lib/python3.11/dist-packages/starlette/middleware/base.py", line 187, in __call__
2025-09-05 10:23:18.519607072 response = await self.dispatch_func(request, call_next)
2025-09-05 10:23:18.519608864 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-09-05 10:23:18.519611187 File "/usr/local/lib/python3.11/dist-packages/slowapi/middleware.py", line 124, in dispatch
2025-09-05 10:23:18.519612809 return await call_next(request)
2025-09-05 10:23:18.519614296 ^^^^^^^^^^^^^^^^^^^^^^^^
2025-09-05 10:23:18.519616551 File "/usr/local/lib/python3.11/dist-packages/starlette/middleware/base.py", line 163, in call_next
2025-09-05 10:23:18.519617939 raise app_exc
2025-09-05 10:23:18.519620148 File "/usr/local/lib/python3.11/dist-packages/starlette/middleware/base.py", line 149, in coro
2025-09-05 10:23:18.519621918 await self.app(scope, receive_or_disconnect, send_no_error)
2025-09-05 10:23:18.519624148 File "/usr/local/lib/python3.11/dist-packages/starlette/middleware/base.py", line 185, in __call__
2025-09-05 10:23:18.519625702 with collapse_excgroups():
2025-09-05 10:23:18.519627475 File "/usr/lib/python3.11/contextlib.py", line 155, in __exit__
2025-09-05 10:23:18.519629046 self.gen.throw(typ, value, traceback)
2025-09-05 10:23:18.519631288 File "/usr/local/lib/python3.11/dist-packages/starlette/_utils.py", line 82, in collapse_excgroups
2025-09-05 10:23:18.519632608 raise exc
2025-09-05 10:23:18.519634804 File "/usr/local/lib/python3.11/dist-packages/starlette/middleware/base.py", line 187, in __call__
2025-09-05 10:23:18.519636622 response = await self.dispatch_func(request, call_next)
2025-09-05 10:23:18.519638436 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-09-05 10:23:18.519640491 File "/opt/frigate/frigate/api/fastapi_app.py", line 89, in frigate_middleware
2025-09-05 10:23:18.519642166 response = await call_next(request)
2025-09-05 10:23:18.519643786 ^^^^^^^^^^^^^^^^^^^^^^^^
2025-09-05 10:23:18.519646119 File "/usr/local/lib/python3.11/dist-packages/starlette/middleware/base.py", line 163, in call_next
2025-09-05 10:23:18.519647439 raise app_exc
2025-09-05 10:23:18.519649598 File "/usr/local/lib/python3.11/dist-packages/starlette/middleware/base.py", line 149, in coro
2025-09-05 10:23:18.519651483 await self.app(scope, receive_or_disconnect, send_no_error)
2025-09-05 10:23:18.519653758 File "/usr/local/lib/python3.11/dist-packages/starlette/middleware/base.py", line 185, in __call__
2025-09-05 10:23:18.519655424 with collapse_excgroups():
2025-09-05 10:23:18.519657364 File "/usr/lib/python3.11/contextlib.py", line 155, in __exit__
2025-09-05 10:23:18.519659028 self.gen.throw(typ, value, traceback)
2025-09-05 10:23:18.519661317 File "/usr/local/lib/python3.11/dist-packages/starlette/_utils.py", line 82, in collapse_excgroups
2025-09-05 10:23:18.519662653 raise exc
2025-09-05 10:23:18.519664942 File "/usr/local/lib/python3.11/dist-packages/starlette/middleware/base.py", line 187, in __call__
2025-09-05 10:23:18.519666757 response = await self.dispatch_func(request, call_next)
2025-09-05 10:23:18.519668531 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-09-05 10:23:18.519671132 File "/usr/local/lib/python3.11/dist-packages/starlette_context/middleware/context_middleware.py", line 78, in dispatch
2025-09-05 10:23:18.519672773 response = await call_next(request)
2025-09-05 10:23:18.519674374 ^^^^^^^^^^^^^^^^^^^^^^^^
2025-09-05 10:23:18.519676710 File "/usr/local/lib/python3.11/dist-packages/starlette/middleware/base.py", line 163, in call_next
2025-09-05 10:23:18.519678107 raise app_exc
2025-09-05 10:23:18.519680432 File "/usr/local/lib/python3.11/dist-packages/starlette/middleware/base.py", line 149, in coro
2025-09-05 10:23:18.519682487 await self.app(scope, receive_or_disconnect, send_no_error)
2025-09-05 10:23:18.519684968 File "/usr/local/lib/python3.11/dist-packages/starlette/middleware/exceptions.py", line 62, in __call__
2025-09-05 10:23:18.519687085 await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
2025-09-05 10:23:18.519689419 File "/usr/local/lib/python3.11/dist-packages/starlette/_exception_handler.py", line 53, in wrapped_app
2025-09-05 10:23:18.519690747 raise exc
2025-09-05 10:23:18.519693015 File "/usr/local/lib/python3.11/dist-packages/starlette/_exception_handler.py", line 42, in wrapped_app
2025-09-05 10:23:18.519694535 await app(scope, receive, sender)
2025-09-05 10:23:18.519696723 File "/usr/local/lib/python3.11/dist-packages/starlette/routing.py", line 715, in __call__
2025-09-05 10:23:18.519698411 await self.middleware_stack(scope, receive, send)
2025-09-05 10:23:18.519700503 File "/usr/local/lib/python3.11/dist-packages/starlette/routing.py", line 735, in app
2025-09-05 10:23:18.519702115 await route.handle(scope, receive, send)
2025-09-05 10:23:18.519704227 File "/usr/local/lib/python3.11/dist-packages/starlette/routing.py", line 288, in handle
2025-09-05 10:23:18.519705806 await self.app(scope, receive, send)
2025-09-05 10:23:18.519707844 File "/usr/local/lib/python3.11/dist-packages/starlette/routing.py", line 76, in app
2025-09-05 10:23:18.519709786 await wrap_app_handling_exceptions(app, request)(scope, receive, send)
2025-09-05 10:23:18.519712030 File "/usr/local/lib/python3.11/dist-packages/starlette/_exception_handler.py", line 53, in wrapped_app
2025-09-05 10:23:18.519713351 raise exc
2025-09-05 10:23:18.519715591 File "/usr/local/lib/python3.11/dist-packages/starlette/_exception_handler.py", line 42, in wrapped_app
2025-09-05 10:23:18.519717125 await app(scope, receive, sender)
2025-09-05 10:23:18.519719151 File "/usr/local/lib/python3.11/dist-packages/starlette/routing.py", line 73, in app
2025-09-05 10:23:18.519720629 response = await f(request)
2025-09-05 10:23:18.519722073 ^^^^^^^^^^^^^^^^
2025-09-05 10:23:18.519724125 File "/usr/local/lib/python3.11/dist-packages/fastapi/routing.py", line 301, in app
2025-09-05 10:23:18.519725755 raw_response = await run_endpoint_function(
2025-09-05 10:23:18.519727346 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-09-05 10:23:18.519729653 File "/usr/local/lib/python3.11/dist-packages/fastapi/routing.py", line 214, in run_endpoint_function
2025-09-05 10:23:18.519731463 return await run_in_threadpool(dependant.call, **values)
2025-09-05 10:23:18.519733167 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-09-05 10:23:18.519735437 File "/usr/local/lib/python3.11/dist-packages/starlette/concurrency.py", line 39, in run_in_threadpool
2025-09-05 10:23:18.519737244 return await anyio.to_thread.run_sync(func, *args)
2025-09-05 10:23:18.519738976 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-09-05 10:23:18.519741088 File "/usr/local/lib/python3.11/dist-packages/anyio/to_thread.py", line 56, in run_sync
2025-09-05 10:23:18.519742922 return await get_async_backend().run_sync_in_worker_thread(
2025-09-05 10:23:18.519744727 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-09-05 10:23:18.519747094 File "/usr/local/lib/python3.11/dist-packages/anyio/_backends/_asyncio.py", line 2476, in run_sync_in_worker_thread
2025-09-05 10:23:18.519748461 return await future
2025-09-05 10:23:18.519749812 ^^^^^^^^^^^^
2025-09-05 10:23:18.519752013 File "/usr/local/lib/python3.11/dist-packages/anyio/_backends/_asyncio.py", line 967, in run
2025-09-05 10:23:18.519753581 result = context.run(func, *args)
2025-09-05 10:23:18.519755115 ^^^^^^^^^^^^^^^^^^^^^^^^
2025-09-05 10:23:18.519757023 File "/opt/frigate/frigate/api/media.py", line 1601, in label_thumbnail
2025-09-05 10:23:18.519758683 return event_thumbnail(request, event_id, 60)
2025-09-05 10:23:18.519760331 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-09-05 10:23:18.519762378 File "/opt/frigate/frigate/api/media.py", line 938, in event_thumbnail
2025-09-05 10:23:18.519764088 media_type=extension.get_mime_type(),
2025-09-05 10:23:18.519765695 ^^^^^^^^^^^^^^^^^^^^^^^
2025-09-05 10:23:18.519767500 AttributeError: 'int' object has no attribute 'get_mime_type'Relevant go2rtc log output/Operating systemDebian Install methodDocker Compose Network connectionWired Camera make and modelTapo C320WS Screenshots of the Frigate UI's System metrics pages/ Any other information that may be helpfulNo response |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
|
Based on the error traceback you provided, this appears to be a bug in the Frigate API code where there's a type mismatch when handling the best.jpg endpoint. The specific error shows: This occurs in the Similar internal server errors have been reported with other Frigate API endpoints. There was a related issue with preview GIF endpoints that also resulted in server errors due to missing data (1). Additionally, there have been other reports of 500 Internal Server Error responses from various Frigate API endpoints (2). This appears to be a code-level bug in Frigate version 0.16.1 where the thumbnail API endpoint is not properly handling the file extension parameter, causing the server to crash when trying to generate thumbnails for certain events. Since this is affecting the core API functionality and appears to be a regression or bug in the current version, you should report this issue to the Frigate GitHub repository with the full error traceback you provided, as it contains the specific code path and line number where the error occurs. 📚 Sources:
Have another question? Just tag @inkeep. |
Beta Was this translation helpful? Give feedback.
-
|
Thanks, this is fixed in #19930 After it's committed, you can grab the fix in the latest |
Beta Was this translation helpful? Give feedback.
-
|
This fix is available in |
Beta Was this translation helpful? Give feedback.
This fix is available in
ghcr.io/blakeblackshear/frigate:d7f7cd7.