robotastic/trunk-recorder

Talkgroup Loading: Description is required error

Closed this issue · 1 comments

Summary

When loading Talkgroup data, loading can fail if the Description field is a String, but that String is convertible to an Int.

Expected Results

Talkgroup data should load if the value in the Description column is a String.

Actual Results

When loading Talkgroup data that was downloaded directly from Radio Reference, if the 'Description' field is an Int value wrapped in quotations (ex: "47"), the load will fail, even though the value's type is actually String.

Repro

  1. Download Talkgroup data for Frisco (Frisco, TX) from Radio Reference
  2. Configure Trunk Recorder to load this TG data
  3. Attempt to start Trunk Recorder
  4. Observe the error below:
[2024-01-28 15:23:37.767709] (info)   Loading Talkgroups...
[2024-01-28 15:23:37.767715] (info)   Reading Talkgroup CSV File: /scanner/config/frisco-channel-list.csv
[2024-01-28 15:23:37.768013] (info)   Found Columns: Decimal, Hex, Alpha Tag, Mode, Description, Tag, Category
[2024-01-28 15:23:37.768191] (error)   Description is required for Row: 56
  1. Review Row 56
  • Look for"3"
423,1a7,"Prosper PD 3",D,"3",Law Talk,"Prosper Police"
  1. Change the Description to something other than a int wrapped in string
  • Change"3" to "Ops 3"
423,1a7,"Prosper PD 3",D,"Ops 3",Law Talk,"Prosper Police"
  1. Attempt to start Trunk Recorder
  2. Observe that Trunk Recorder now starts without error

Thanks for the well documented bug report! fixed this in the rf/v5.0 branch.