blakeblackshear / frigate

NVR with realtime local object detection for IP cameras
https://frigate.video
MIT License
18.26k stars 1.66k forks source link

Camera feed green + several other errors. Please help? #348

Closed asemev closed 3 years ago

asemev commented 3 years ago

First of all, big thank you for making this! I have been dreaming of such a solution for 2 years now and finally you did it! πŸ‘ I would be eternally grateful if you can help me out. Thank you Blake!

Describe the bug I have experienced several issues:

  1. When i use my Samsung Hanwha Techwin camera, the video feed is green. So when i check the URL http://192.168.178.84:5000/Garage, i just see green screen. Ps see attached screenshot below. With my ezviz camera it works very well. So it must be some camera codec issue with the HANWHA camera perhaps?

  2. In general, the ffmepg HW acceleration or any of the global parameters always cause errors. so i removed them all. Also the frigate logs showed error with your default config version because perhaps the ffmpeg arguments have double entries (one in the upper part in the ffmpeg's own config section and then again in the camera section). Removing all these made the frigate work. I just cannot get the ffmpeg HW acceleration working. Tried it with the Raspi3/4 64bit version.

  3. I made frigate detection work with another camera (EZVIZ CTQ3W) but i constantly get over 100% CPU even though i'm using the Coral accelerator. Is this normal?

  4. The logs always show the following error everytime it starts. "Fontconfig error: Cannot load default config file". Is this normal?

  5. I also continuously get "On connect called" but i dont see the docker container running multiple times.

Version of frigate 1.3

Config file Include your full config file wrapped in triple back ticks.

detectors:
  coral:
    type: edgetpu
    device: usb
save_clips:
  clips_dir: /media/frigate
mqtt:
  host: core-mosquitto.local.hass.io
  port: 1883
  topic_prefix: frigate
  client_id: frigate
  user: **XXXXXXX**
  password: **XXXXXXXX**
ffmpeg: {}
cameras:
  Garage:
    ffmpeg:
      input: 'rtsp://192.168.178.234/profile1/media.smp'
    height: 1080
    width: 1920
    fps: 5
    best_image_timeout: 60
    mqtt:
      crop_to_region: true
      snapshot_height: 300
    save_clips:
      enabled: false
      pre_capture: 30
      objects:
        - person
    snapshots:
      show_timestamp: true
      draw_zones: false
      draw_bounding_boxes: true
    objects:
      track:
        - person
        - car
      filters:
        person:
          min_area: 5000
          max_area: 100000
          min_score: 0.5
          threshold: 0.85

Logs Fontconfig error: Cannot load default config file Starting detection process: 16 Attempting to load TPU as usb Camera capture process started for Garage: 17 Camera process started for Garage: 19 Creating ffmpeg process... ffmpeg -hide_banner -loglevel panic -avoid_negative_ts make_zero -fflags nobuffer -flags low_delay -strict experimental -fflags +genpts+discardcorrupt -rtsp_transport tcp -stimeout 5000000 -use_wallclock_as_timestamps 1 -i rtsp://192.168.178.234/profile1/media.smp -r 5 -f rawvideo -pix_fmt yuv420p pipe:

FFprobe from your camera This camera has 3 profiles. Did ffprobe for all 3 profiles below.

ubuntu@ubuntu:~$ ffprobe rtsp://192.168.178.234/profile1/media.smp ffprobe version 4.2.4-1ubuntu0.1 Copyright (c) 2007-2020 the FFmpeg developers built with gcc 9 (Ubuntu 9.3.0-10ubuntu2) configuration: --prefix=/usr --extra-version=1ubuntu0.1 --toolchain=hardened --libdir=/usr/lib/aarch64-linux-gnu --incdir=/usr/include/aarch64-linux-gnu --arch=arm64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared libavutil 56. 31.100 / 56. 31.100 libavcodec 58. 54.100 / 58. 54.100 libavformat 58. 29.100 / 58. 29.100 libavdevice 58. 8.100 / 58. 8.100 libavfilter 7. 57.100 / 7. 57.100 libavresample 4. 0. 0 / 4. 0. 0 libswscale 5. 5.100 / 5. 5.100 libswresample 3. 5.100 / 3. 5.100 libpostproc 55. 5.100 / 55. 5.100 Input #0, rtsp, from 'rtsp://192.168.178.234/profile1/media.smp': Metadata: title : Media Presentation comment : samsung Duration: N/A, start: 0.052144, bitrate: N/A Stream #0:0: Video: mjpeg (Baseline), yuvj420p(pc, bt470bg/unknown/unknown), 640x360 [SAR 1:1 DAR 16:9], 5 tbr, 90k tbn, 90k tbc Stream #0:1: Data: none Unsupported codec with id 0 for input stream 1

ubuntu@ubuntu:~$ ffprobe rtsp://192.168.178.234/profile2/media.smp ffprobe version 4.2.4-1ubuntu0.1 Copyright (c) 2007-2020 the FFmpeg developers built with gcc 9 (Ubuntu 9.3.0-10ubuntu2) configuration: --prefix=/usr --extra-version=1ubuntu0.1 --toolchain=hardened --libdir=/usr/lib/aarch64-linux-gnu --incdir=/usr/include/aarch64-linux-gnu --arch=arm64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared libavutil 56. 31.100 / 56. 31.100 libavcodec 58. 54.100 / 58. 54.100 libavformat 58. 29.100 / 58. 29.100 libavdevice 58. 8.100 / 58. 8.100 libavfilter 7. 57.100 / 7. 57.100 libavresample 4. 0. 0 / 4. 0. 0 libswscale 5. 5.100 / 5. 5.100 libswresample 3. 5.100 / 3. 5.100 libpostproc 55. 5.100 / 55. 5.100 Input #0, rtsp, from 'rtsp://192.168.178.234/profile2/media.smp': Metadata: title : Media Presentation comment : samsung Duration: N/A, start: 0.013000, bitrate: N/A Stream #0:0: Video: h264 (High), yuvj420p(pc, bt709, progressive), 1280x720, 20 tbr, 90k tbn, 180k tbc Stream #0:1: Data: none Unsupported codec with id 0 for input stream 1

ubuntu@ubuntu:~$ ffprobe rtsp://192.168.178.234/profile3/media.smp ffprobe version 4.2.4-1ubuntu0.1 Copyright (c) 2007-2020 the FFmpeg developers built with gcc 9 (Ubuntu 9.3.0-10ubuntu2) configuration: --prefix=/usr --extra-version=1ubuntu0.1 --toolchain=hardened --libdir=/usr/lib/aarch64-linux-gnu --incdir=/usr/include/aarch64-linux-gnu --arch=arm64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared libavutil 56. 31.100 / 56. 31.100 libavcodec 58. 54.100 / 58. 54.100 libavformat 58. 29.100 / 58. 29.100 libavdevice 58. 8.100 / 58. 8.100 libavfilter 7. 57.100 / 7. 57.100 libavresample 4. 0. 0 / 4. 0. 0 libswscale 5. 5.100 / 5. 5.100 libswresample 3. 5.100 / 3. 5.100 libpostproc 55. 5.100 / 55. 5.100 Input #0, rtsp, from 'rtsp://192.168.178.234/profile3/media.smp': Metadata: title : Media Presentation comment : samsung Duration: N/A, start: 0.025000, bitrate: N/A Stream #0:0: Video: hevc (Main), yuv420p(tv), 2592x1520, 20 fps, 20 tbr, 90k tbn, 90k tbc Stream #0:1: Data: none Unsupported codec with id 0 for input stream 1

Screenshots

image

image

image

image

Computer Hardware

Camera Info:

Thank you very much in advance! :) EMRE

scottgrobinson commented 3 years ago

Do you know how to build your own docker image? If so - It sounds like it might be similar to this: https://github.com/blakeblackshear/frigate/issues/312... Maybe...

I was having the same problem on certain types of RTSP feeds until I increased the timeout. If you're not too sure on building docker images, it my be worth trying the latest beta (0.8.0) which I believe has support for this already in the configuration.

If building your own image - Change frigate/video.py line 196 to increase the 5 seconds to something like 15/20.

asemev commented 3 years ago

Thank you Scott. HA did itself the docker installation....

blakeblackshear commented 3 years ago

The width and height from the ffprobe output say 640x360.

Try this:

web_port: 5000
detectors:
  coral:
    type: edgetpu
    device: usb
save_clips:
  clips_dir: /media/frigate
mqtt:
  host: core-mosquitto.local.hass.io
  port: 1883
  topic_prefix: frigate
  client_id: frigate
  user: **XXXXXXX**
  password: **XXXXXXXX**
ffmpeg:
  global_args:
    - -hide_banner
    - -loglevel
    - fatal
  input_args:
    - -avoid_negative_ts
    - make_zero
    - -fflags
    - +genpts+discardcorrupt
    - -rtsp_transport
    - tcp
    - -stimeout
    - '5000000'
    - -use_wallclock_as_timestamps
    - '1'
cameras:
  Garage:
    ffmpeg:
      input: 'rtsp://192.168.178.234/profile1/media.smp'
    height: 360
    width: 640
    fps: 5
    best_image_timeout: 60
    mqtt:
      crop_to_region: true
      snapshot_height: 300
    save_clips:
      enabled: false
      pre_capture: 30
      objects:
        - person
    snapshots:
      show_timestamp: true
      draw_zones: false
      draw_bounding_boxes: true
    objects:
      track:
        - person
        - car
      filters:
        person:
          min_area: 5000
          max_area: 100000
          min_score: 0.5
          threshold: 0.85
asemev commented 3 years ago

Hi Blake,

Thank you so much for your help. I didnt try your config proposal yet because i installed the 0.8 Beta as Scott adviced (as it provides much better CPU performance I am super interested to make this work).

So here is the new config i tried:

detectors:
  coral:
    type: edgetpu
    device: usb
mqtt:
  host: core-mosquitto.local.hass.io
  port: 1883
  topic_prefix: frigate
  client_id: frigate
  user: mqtt
  password: emre1972
ffmpeg:
  global_args: '-hide_banner -loglevel fatal'
  hwaccel_args: []
  input_args: >-
    -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport
    tcp -stimeout 5000000 -use_wallclock_as_timestamps 1
  output_args:
    detect: '-f rawvideo -pix_fmt yuv420p'
    record: >-
      -f segment -segment_time 60 -segment_format mp4 -reset_timestamps 1
      -strftime 1 -c copy -an
    clips: >-
      -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1
      -strftime 1 -c copy -an
    rtmp: '-c copy -f flv'
cameras:
  Garage:
    ffmpeg:
      inputs:
        - path: 'rtsp://admin:KDROSK@192.168.178.209:554/h.264'
          roles:
            - detect
            - rtmp
          global_args: null
          hwaccel_args: null
          input_args: null
      global_args: null
      hwaccel_args: null
      input_args: null
      output_args: null
    width: 1920
    height: 1080
    fps: 5
    mask: 'poly,935,2,1910,9,1912,528,932,50'
    best_image_timeout: 60
    zones:
      Front:
        coordinates: '935,2,1910,9,1912,528,932,50'
        filters:
          person:
            min_area: 5000
            max_area: 100000
            threshold: 0.8
    save_clips:
      enabled: false
      pre_capture: 30
      objects:
        - person
      retain:
        default: 10
        objects:
          person: 15
    record:
      enabled: false
      retain_days: 30
    rtmp:
      enabled: false
    snapshots:
      show_timestamp: true
      draw_zones: true
      draw_bounding_boxes: true
      crop_to_region: true
      height: 175
    objects:
      track:
        - person
        - car
      filters:
        person:
          min_area: 5000
          max_area: 100000
          min_score: 0.5
          threshold: 0.85
logger:
  default: info
  logs:
    frigate.mqtt: error
model:
  height: 320
  width: 320
save_clips:
  max_seconds: 300
  retain:
    default: 10
    objects:
      person: 15
objects:
  track:
    - person
  filters:
    person:
      min_area: 5000
      max_area: 100000
      min_score: 0.5
      threshold: 0.85

But the Log is showing an error:

Any idea what could be causing this? Many thanks again!!! :)

Best, Emre

image

blakeblackshear commented 3 years ago

You can't use null for your args values.

Try this config:

detectors:
  coral:
    type: edgetpu
    device: usb
mqtt:
  host: core-mosquitto.local.hass.io
  port: 1883
  topic_prefix: frigate
  client_id: frigate
  user: mqtt
  password: emre1972
cameras:
  Garage:
    ffmpeg:
      inputs:
        - path: 'rtsp://admin:KDROSK@192.168.178.209:554/h.264'
          roles:
            - detect
            - rtmp
    width: 1920
    height: 1080
    fps: 5
    mask: 'poly,935,2,1910,9,1912,528,932,50'
    best_image_timeout: 60
    zones:
      Front:
        coordinates: '935,2,1910,9,1912,528,932,50'
        filters:
          person:
            min_area: 5000
            max_area: 100000
            threshold: 0.8
    save_clips:
      enabled: false
      pre_capture: 30
      objects:
        - person
      retain:
        default: 10
        objects:
          person: 15
    record:
      enabled: false
      retain_days: 30
    rtmp:
      enabled: false
    snapshots:
      show_timestamp: true
      draw_zones: true
      draw_bounding_boxes: true
      crop_to_region: true
      height: 175
    objects:
      track:
        - person
        - car
      filters:
        person:
          min_area: 5000
          max_area: 100000
          min_score: 0.5
          threshold: 0.85
logger:
  default: info
  logs:
    frigate.mqtt: error
save_clips:
  max_seconds: 300
  retain:
    default: 10
    objects:
      person: 15
objects:
  track:
    - person
  filters:
    person:
      min_area: 5000
      max_area: 100000
      min_score: 0.5
      threshold: 0.85
asemev commented 3 years ago

Its working now!!! Thank you!

So i cannot use any ffmpeg accelerator then right? I wonder why?

blakeblackshear commented 3 years ago

You have to disable protection mode for the addon: https://github.com/blakeblackshear/frigate/issues/340#issue-759790120

Once that is done, try updating your config with:

detectors:
  coral:
    type: edgetpu
    device: usb
ffmpeg:
  hwaccel_args: -c:v h264_v4l2m2m
mqtt:
  host: core-mosquitto.local.hass.io
  port: 1883
  topic_prefix: frigate
  client_id: frigate
  user: mqtt
  password: emre1972
cameras:
  Garage:
    ffmpeg:
      inputs:
        - path: 'rtsp://admin:KDROSK@192.168.178.209:554/h.264'
          roles:
            - detect
            - rtmp
    width: 1920
    height: 1080
    fps: 5
    mask: 'poly,935,2,1910,9,1912,528,932,50'
    best_image_timeout: 60
    zones:
      Front:
        coordinates: '935,2,1910,9,1912,528,932,50'
        filters:
          person:
            min_area: 5000
            max_area: 100000
            threshold: 0.8
    save_clips:
      enabled: false
      pre_capture: 30
      objects:
        - person
      retain:
        default: 10
        objects:
          person: 15
    record:
      enabled: false
      retain_days: 30
    rtmp:
      enabled: false
    snapshots:
      show_timestamp: true
      draw_zones: true
      draw_bounding_boxes: true
      crop_to_region: true
      height: 175
    objects:
      track:
        - person
        - car
      filters:
        person:
          min_area: 5000
          max_area: 100000
          min_score: 0.5
          threshold: 0.85
logger:
  default: info
  logs:
    frigate.mqtt: error
save_clips:
  max_seconds: 300
  retain:
    default: 10
    objects:
      person: 15
objects:
  track:
    - person
  filters:
    person:
      min_area: 5000
      max_area: 100000
      min_score: 0.5
      threshold: 0.85
asemev commented 3 years ago

CPU Performance went down to 30%max on each core. It used to be 90% on each core. This is amazing. Thank you for everything Blake! You're a genius :)

asemev commented 3 years ago

Hi Blake, i also added my Garden cam now to the config and the CPU has gone up a lot. Is it normal?

image

Thanks.

blakeblackshear commented 3 years ago

The CPU load depends on the resolution, frame rates, and the amount of motion from your cameras. Using masks to block off areas with unwanted motion will reduce CPU usage.

asemev commented 3 years ago

Thank you. I will tweak the settings.

asemev commented 3 years ago

Much better already :)

image

asemev commented 3 years ago

Made the mask area bigger and lowered the 2nd camera resolution to 720p. And now its really good.

image

asemev commented 3 years ago

Hi Blake, just FYI. I noticed a certain behavior. When frigate starts the cpu load is quite low in the first 1 hour but then later it goes up a lot. I tried this several times. So after applying a bigger mask and lowering the camera res to 720p and lowering the frame rates I reported above that cpu was down to around 30% (with 2 cameras). But pls have a look at the current cpu load now (i havent changed any settings):

image

blakeblackshear commented 3 years ago

The data at /debug/stats will tell you more about what is happening.

asemev commented 3 years ago

Hi Blake, thank you. I cannot get the stats working. Could you please help? :)

i get this error when i go to http://192.168.178.84:5000/debug/stats:

image

This is what i entered in my "configuration.yaml" (I have other sensors so i skipped entering "sensor:" at the top, and config test doesnt report any errors):

blakeblackshear commented 3 years ago

Make sure your are using the beta documentation. The new stats ending is /stats. Also, no need to setup these rest sensors. The new integration does that for you. https://github.com/blakeblackshear/frigate-hass-integration

asemev commented 3 years ago

Thank you Blake. Indeed i was not looking at the beta documentation. my bad.

btw searched HACS but i cannot find your integration. Searched frigate and blakeblackshear...

oh and i started sponsoring you as you have been so kind in helping me out! :)

image

blakeblackshear commented 3 years ago

I appreciate that. You have to add it as a custom repository. It isn't available in the official repo yet: https://hacs.xyz/docs/faq/custom_repositories

asemev commented 3 years ago

Thanks again i installed it now πŸ‘

so just to be sure: I dont need any of the configuration.yaml entries that are mentioned in the original setup instructions right? I mean these:

image

blakeblackshear commented 3 years ago

Correct. Once you add the integration, it will setup all of that for you.

asemev commented 3 years ago

awesome, thank you. cleaned up the configuration.yaml now.

asemev commented 3 years ago

sorry to disturb you again. Now after i removed all those old entries from the configuration.yaml (as HACS is doing it now), i cannot find the Frigate camera entities (Garage and Garden). Frigate is working so i guess they are hidden? I wanted to add the motion snapshot to my HA main homescreen as a picture entity card..

btw, the stats are working :) Dont know how to interpret those numbers though...

{"Garage":{"camera_fps":5.0,"capture_pid":38,"detection_fps":20.5,"pid":36,"process_fps":4.1,"skipped_fps":0.0},"Garden":{"camera_fps":5.0,"capture_pid":40,"detection_fps":0.0,"pid":37,"process_fps":5.0,"skipped_fps":0.0},"detection_fps":20.5,"detectors":{"coral":{"detection_start":0.0,"inference_speed":20.02,"pid":33}}}

blakeblackshear commented 3 years ago

Just to confirm, you did setup the integration after installing with HACS right? Do you see Frigate listed when you go to Configuration > Integrations?

asemev commented 3 years ago

No I dont see Frigate in Configuration > Integrations. I guess i did the setup wrong? I installed HACS integration. It seems to be installed well. And i restarted the HA and also the Frigate addon in Supervisor.

image

image

image

asemev commented 3 years ago

image

asemev commented 3 years ago

image

blakeblackshear commented 3 years ago

Click the add integration button and search for frigate from the integrations page. HACS just makes it show up in that list, but doesn't enable it.

asemev commented 3 years ago

i think i did that already:

image

asemev commented 3 years ago

image

blakeblackshear commented 3 years ago

That is the HACS page. I'm referring to Configuration > Integrations

asemev commented 3 years ago

Oooooooh i see now! Such a rookie i am :) Thanks again!

asemev commented 3 years ago

image

asemev commented 3 years ago

image

asemev commented 3 years ago

ok fixed (entered the IP address of my HA)

image

asemev commented 3 years ago

HI Blake,

Since moving to the HACS custom component, and removing all the config.yaml entries, my setup has been very stable now, the CPU load is not going over 30%, so overall super happy! :) Thanks a million for helping me out. This is seriously my dream come true.

The only thing i'm now struggling with is the automations to send me notifications with the snapshots outside my LAN network. I tried many thing but cant get the pictures coming with the notification. also most of the time the notification dosnt come at all.

alias: Notify Person Detection description: '' trigger:

NOTE: I inserted my duckdns URL in here. And maybe thats the problem?

I see the following errors in the HA logs:

Logger: homeassistant.components.automation.garden_person_detection Source: helpers/service.py:190 Integration: Automation (documentation, issues) First occurred: December 15, 2020, 11:00:49 PM (6 occurrences) Last logged: December 15, 2020, 11:05:36 PM

Notify Person Detection: Error executing script. Unexpected error for call_service at pos 1: Error rendering data template: UndefinedError: 'trigger' is undefined While executing automation automation.garden_person_detection Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 353, in async_render render_result = compiled.render(kwargs) File "/usr/local/lib/python3.8/site-packages/jinja2/environment.py", line 1090, in render self.environment.handle_exception() File "/usr/local/lib/python3.8/site-packages/jinja2/environment.py", line 832, in handle_exception reraise(*rewrite_traceback_stack(source=source)) File "/usr/local/lib/python3.8/site-packages/jinja2/_compat.py", line 28, in reraise raise value.with_traceback(tb) File "