[Support]: LRP is crashing in 0.16.0-beta3 #18849
-
Checklist
Describe the problem you are havingThe license plate recognition on the car has stopped working, and there are unclear errors in the logs. Steps to reproduce... Version0.16.0-f141b58 In which browser(s) are you experiencing the issue with?No response Frigate config filedomofon:
ffmpeg:
output_args:
record: preset-record-generic-audio-copy
inputs:
- path: rtsp://127.0.0.1:8554/domofon_cam
input_args: preset-rtsp-restream
roles:
- record
- path: rtsp://127.0.0.1:8554/domofon_cam_sub
input_args: preset-rtsp-restream
roles:
- detect
detect:
enabled: true
width: 1280
height: 720
annotation_offset: -300
objects:
track:
- person
- face
- dog
- car
- license_plate
filters:
license_plate:
threshold: 0.6
car:
mask:
0,0.513,0.275,0.538,0.345,0.545,0.45,0.552,0.452,0.644,0.459,0.711,0.516,1,1,1,1,0,0,0
motion:
mask:
- 0,0,1280,0,1280,371,0,332
live:
streams:
domofon_cam: domofon_cam
mqtt:
timestamp: false
bounding_box: false
crop: true
quality: 100
height: 500
snapshots:
enabled: True
zones:
gate_entrance_zone:
coordinates: 0.003,0.868,0.19,0.725,0.407,0.73,0.395,0.824,0.436,0.827,0.435,0.999,0,1
loitering_time: 0
objects:
- car
- person
- license_plate
review:
alerts:
required_zones: gate_entrance_zone
notifications:
enabled: true
lpr:
enabled: true
device: CPU
model_size: large
min_area: 1000
min_plate_length: 8
known_plates:
Lexus:
- '(?i)(?:.*)?([HM][1I]{3}[HM]C59)(?:.*)?'
Velar:
- '(?i)(?:.*)?[HM][1I]59PP159(?:.*)?'
Mazda:
- '(?i)(?:.*)?K818TB159(?:.*)?'
Evoque:
- '(?i)(?:.*)?E[1I]59[0O][9Yy]159(?:.*)?' docker-compose file or Docker CLI command- Relevant Frigate log output2025-06-24 12:13:30.764439823 You have successfully opted out to send the telemetry data.
2025-06-24 12:13:30.779173075 [INFO] Preparing Frigate...
2025-06-24 12:13:31.265370943 [INFO] Starting Frigate...
2025-06-24 12:13:33.442515083 [2025-06-24 12:13:33] frigate.util.config INFO : Checking if frigate config needs migration...
2025-06-24 12:13:33.635031607 [2025-06-24 12:13:33] frigate.util.config INFO : frigate config does not need migration...
2025-06-24 12:13:33.751483661 [2025-06-24 12:13:33] frigate.app INFO : Starting Frigate (0.16.0-f141b58)
2025-06-24 12:13:33.774089222 [2025-06-24 12:13:33] peewee_migrate.logs INFO : Starting migrations
2025-06-24 12:13:33.774597788 [2025-06-24 12:13:33] peewee_migrate.logs INFO : There is nothing to migrate
2025-06-24 12:13:33.783348757 [2025-06-24 12:13:33] frigate.app INFO : Recording process started: 371
2025-06-24 12:13:33.792245849 [2025-06-24 12:13:33] frigate.app INFO : Review process started: 376
2025-06-24 12:13:33.795118588 [2025-06-24 12:13:33] frigate.app INFO : go2rtc process pid: 124
2025-06-24 12:13:33.813836330 [2025-06-24 12:13:33] detector.coral INFO : Starting detection process: 387
2025-06-24 12:13:33.814762029 [2025-06-24 12:13:33] frigate.detectors.plugins.edgetpu_tfl INFO : Attempting to load TPU as pci
2025-06-24 12:13:33.815506467 [2025-06-24 12:13:33] frigate.app INFO : Embedding process started: 394
2025-06-24 12:13:33.818304536 [2025-06-24 12:13:33] frigate.detectors.plugins.edgetpu_tfl INFO : TPU found
2025-06-24 12:13:33.818884442 INFO: Created TensorFlow Lite XNNPACK delegate for CPU.
2025-06-24 12:13:33.840688655 [2025-06-24 12:13:33] frigate.app INFO : Output process started: 436
2025-06-24 12:13:34.194606013 [2025-06-24 12:13:34] frigate.app INFO : Camera processor started for most: 459
2025-06-24 12:13:34.204777457 [2025-06-24 12:13:34] frigate.app INFO : Camera processor started for besedka-vorota: 463
2025-06-24 12:13:34.214873800 [2025-06-24 12:13:34] frigate.app INFO : Camera processor started for besedka-trap: 474
2025-06-24 12:13:34.226292607 [2025-06-24 12:13:34] frigate.app INFO : Camera processor started for pech-trap: 486
2025-06-24 12:13:34.237164619 [2025-06-24 12:13:34] frigate.app INFO : Camera processor started for trap-besedka: 499
2025-06-24 12:13:34.248411814 [2025-06-24 12:13:34] frigate.app INFO : Camera processor started for trap-pech: 508
2025-06-24 12:13:34.268232867 [2025-06-24 12:13:34] frigate.app INFO : Camera processor started for vorota-pech: 515
2025-06-24 12:13:34.268560800 [2025-06-24 12:13:34] frigate.app INFO : Camera processor started for vorota-besedka: 520
2025-06-24 12:13:34.310512460 [2025-06-24 12:13:34] frigate.app INFO : Camera processor started for pech-vorota: 539
2025-06-24 12:13:34.322572954 [2025-06-24 12:13:34] frigate.app INFO : Camera processor started for domofon: 552
2025-06-24 12:13:34.339198474 [2025-06-24 12:13:34] frigate.app INFO : Camera processor started for kater: 556
2025-06-24 12:13:34.351981485 [2025-06-24 12:13:34] frigate.app INFO : Camera processor started for gorod: 568
2025-06-24 12:13:34.366339492 [2025-06-24 12:13:34] frigate.app INFO : Capture process started for most: 577
2025-06-24 12:13:34.393291079 [2025-06-24 12:13:34] frigate.app INFO : Capture process started for besedka-vorota: 596
2025-06-24 12:13:34.394619302 [2025-06-24 12:13:34] frigate.app INFO : Capture process started for besedka-trap: 606
2025-06-24 12:13:34.411248292 [2025-06-24 12:13:34] frigate.app INFO : Capture process started for pech-trap: 623
2025-06-24 12:13:34.447298982 [2025-06-24 12:13:34] frigate.app INFO : Capture process started for trap-besedka: 663
2025-06-24 12:13:34.462932962 [2025-06-24 12:13:34] frigate.app INFO : Capture process started for trap-pech: 678
2025-06-24 12:13:34.478341640 [2025-06-24 12:13:34] frigate.app INFO : Capture process started for vorota-pech: 690
2025-06-24 12:13:34.493367064 [2025-06-24 12:13:34] frigate.app INFO : Capture process started for vorota-besedka: 706
2025-06-24 12:13:34.530346563 [2025-06-24 12:13:34] frigate.app INFO : Capture process started for pech-vorota: 724
2025-06-24 12:13:34.531654346 [2025-06-24 12:13:34] frigate.app INFO : Capture process started for domofon: 741
2025-06-24 12:13:34.547929823 [2025-06-24 12:13:34] frigate.app INFO : Capture process started for kater: 754
2025-06-24 12:13:34.559532142 [2025-06-24 12:13:34] frigate.app INFO : Capture process started for gorod: 775
2025-06-24 12:13:34.876757503 [2025-06-24 12:13:34] frigate.api.fastapi_app INFO : Starting FastAPI app
2025-06-24 12:13:35.006536282 [2025-06-24 12:13:35] frigate.api.fastapi_app INFO : FastAPI started
2025-06-24 12:13:35.739645802 loading data from : /config/model_cache/facedet/landmarkdet.yaml
2025-06-24 12:13:36.360438109 INFO: Created TensorFlow Lite XNNPACK delegate for CPU.
2025-06-24 12:13:46.132935450 Exception in thread embeddings_maintainer:
2025-06-24 12:13:46.132938260 Traceback (most recent call last):
2025-06-24 12:13:46.132939710 File "/usr/lib/python3.11/threading.py", line 1038, in _bootstrap_inner
2025-06-24 12:13:46.132943570 self.run()
2025-06-24 12:13:46.132945360 File "/opt/frigate/frigate/embeddings/maintainer.py", line 173, in run
2025-06-24 12:13:46.132946410 self._process_updates()
2025-06-24 12:13:46.132967331 File "/opt/frigate/frigate/embeddings/maintainer.py", line 268, in _process_updates
2025-06-24 12:13:46.132968691 processor.process_frame(data, yuv_frame)
2025-06-24 12:13:46.132969881 File "/opt/frigate/frigate/data_processing/real_time/license_plate.py", line 50, in process_frame
2025-06-24 12:13:46.132971321 self.lpr_process(obj_data, frame, dedicated_lpr)
2025-06-24 12:13:46.132972541 File "/opt/frigate/frigate/data_processing/common/license_plate/mixin.py", line 1501, in lpr_process
2025-06-24 12:13:46.132991911 sub_label = next(
2025-06-24 12:13:46.132992861 ^^^^^
2025-06-24 12:13:46.132994071 File "/opt/frigate/frigate/data_processing/common/license_plate/mixin.py", line 1505, in <genexpr>
2025-06-24 12:13:46.133005971 if any(
2025-06-24 12:13:46.133006801 ^^^^
2025-06-24 12:13:46.133008021 File "/opt/frigate/frigate/data_processing/common/license_plate/mixin.py", line 1506, in <genexpr>
2025-06-24 12:13:46.133008971 re.match(f"^{plate}$", top_plate)
2025-06-24 12:13:46.133009921 File "/usr/lib/python3.11/re/__init__.py", line 166, in match
2025-06-24 12:13:46.133010841 return _compile(pattern, flags).match(string)
2025-06-24 12:13:46.133011721 ^^^^^^^^^^^^^^^^^^^^^^^^
2025-06-24 12:13:46.133012681 File "/usr/lib/python3.11/re/__init__.py", line 294, in _compile
2025-06-24 12:13:46.133013531 p = _compiler.compile(pattern, flags)
2025-06-24 12:13:46.133024621 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-06-24 12:13:46.133025771 File "/usr/lib/python3.11/re/_compiler.py", line 743, in compile
2025-06-24 12:13:46.133026571 p = _parser.parse(p, flags)
2025-06-24 12:13:46.133027341 ^^^^^^^^^^^^^^^^^^^^^^^
2025-06-24 12:13:46.133028421 File "/usr/lib/python3.11/re/_parser.py", line 980, in parse
2025-06-24 12:13:46.133029421 p = _parse_sub(source, state, flags & SRE_FLAG_VERBOSE, 0)
2025-06-24 12:13:46.133030351 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-06-24 12:13:46.133031311 File "/usr/lib/python3.11/re/_parser.py", line 455, in _parse_sub
2025-06-24 12:13:46.133045691 itemsappend(_parse(source, state, verbose, nested + 1,
2025-06-24 12:13:46.133046761 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-06-24 12:13:46.133047711 File "/usr/lib/python3.11/re/_parser.py", line 841, in _parse
2025-06-24 12:13:46.133048591 raise source.error('global flags not at the start '
2025-06-24 12:13:46.133049721 re.error: global flags not at the start of the expression at position 1 Relevant go2rtc log output- Operating systemDebian Install methodDocker Compose Network connectionWired Camera make and modeldahua vto Screenshots of the Frigate UI's System metrics pagesAny other information that may be helpfulNo response |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Your regex is not valid, with that said this crash is caught and that fix will be in beta 4 |
Beta Was this translation helpful? Give feedback.
-
The issue here is that Frigate automatically adds a
which is invalid because You can solve your issue by specifying both cases in the regex itself:
As Nick said earlier, the next beta will not crash on invalid regexes, but will still indicate that they are invalid. |
Beta Was this translation helpful? Give feedback.
The issue here is that Frigate automatically adds a
^
and$
anchors to every regex in yourknown_plates
list. But you've specified case insensitivity with(?i)
, which Python requires at the beginning of a regex. So the generated regex ends up being:^(?i)(?:.*)?([HM][1I]{3}[HM]C59)(?:.*)?$
which is invalid because
(?i)
is not at the beginning.You can solve your issue by specifying both cases in the regex itself: