Mason10198 / SkywarnPlus

Empowering Asterisk / app_rpt Nodes with Local Alert Intelligence
GNU General Public License v3.0
45 stars 3 forks source link

v0.5.1 TypeError on Hamvoip #58

Closed nathantcampbell closed 10 months ago

nathantcampbell commented 10 months ago

Receive the following error when running 0.5.1 with fresh install on hamvoip. When running /usr/local/bin/SkywarnPlus/SkywarnPlus.py

2023-08-13 12:13:08,122 INFO Added: Heat Advisory for [Lane]
2023-08-13 12:13:08,123 INFO Added: Air Quality Alert for [Lane, Lane]
Traceback (most recent call last):
  File "/usr/local/bin/SkywarnPlus/SkywarnPlus.py", line 1758, in <module>
    main()
  File "/usr/local/bin/SkywarnPlus/SkywarnPlus.py", line 1580, in main
    changed_alerts, changes_details = detect_county_changes(last_alerts, alerts)
  File "/usr/local/bin/SkywarnPlus/SkywarnPlus.py", line 1440, in detect_county_changes
    old_county_codes = {info["county_code"] for info in old_alert_info}
  File "/usr/local/bin/SkywarnPlus/SkywarnPlus.py", line 1440, in <setcomp>
    old_county_codes = {info["county_code"] for info in old_alert_info}
TypeError: 'int' object is not subscriptable

To Reproduce Steps to reproduce the behavior:

  1. Follow install steps in readme for hamvoip
  2. Configure config.yaml to include node number and 1 county
  3. Execute SkywarnPlus.py via terminal
  4. See error above

Expected behavior No error

Node (please complete the following information):

Mason10198 commented 10 months ago

Nathan, can you please provide the exact county code you are using, as well as the contents of /tmp/SkywarnPlus/data.json.

Also, if you could clear out the /tmp/SkywarnPlus/ directory, and then run SWP once with debug enabled, and then provide /tmp/SkywarnPlus/SkywarnPlus.log

nathantcampbell commented 10 months ago

Well I feel silly, I cleared the tmp folder and the error is resolved. It wasn't something that occured to me to do when updating. For reference, I updated from v0.3.1

Mason10198 commented 10 months ago

Ah! Did you update manually or by using the UpdateSWP.py script? The script should have cleared out /tmp/SkywarnPlus/, but if you did a manual update and did not clear out the temp data then we should be able to safely close this. (need to make sure update instructions notate to clear out tmp)

Mason10198 commented 10 months ago

Oops, did not mean to close already. Nathan, reopen this if you need to, but I think this was just a stale JSON thing