NebraLtd / hm-pktfwd

Helium Miner Packet Forwarder
https://nebra.io/hnt
MIT License
12 stars 25 forks source link

KeyError: 'region_us915' #115

Closed sentry-io[bot] closed 1 year ago

sentry-io[bot] commented 1 year ago

Sentry Issue: HM-PKTFWD-7

KeyError: 'region_us915'
  File "__main__.py", line 100, in start
    pktfwd_app.start()
  File "/opt/pktfwd/pktfwd_app.py", line 45, in start
    update_global_conf(is_sx1302, self.root_dir,
  File "/opt/pktfwd/utils.py", line 114, in update_global_conf
    replace_sx1301_global_conf_with_regional(root_dir,
  File "/opt/pktfwd/utils.py", line 128, in replace_sx1301_global_conf_with_regional
    get_region_filename(region))
  File "/opt/pktfwd/utils.py", line 99, in get_region_filename
    return REGION_CONFIG_FILENAMES[region]

__main__ failed for unknown reason
shawaj commented 1 year ago

these were removed in https://github.com/NebraLtd/hm-pktfwd/commit/4d5526244045b89f39b97e764dd7c3ddf4b05d29

Maybe we should add them back in as fallbacks?

shawaj commented 1 year ago

I mean these ones:

    "region_as923_1": "AS923-1-global_conf.json",
    "region_as923_2": "AS923-2-global_conf.json",
    "region_as923_3": "AS923-3-global_conf.json",
    "region_as923_4": "AS923-4-global_conf.json",
    "region_au915": "AU-global_conf.json",
    "region_cn470": "CN-global_conf.json",
    "region_eu433": "EU433-global_conf.json",
    "region_eu868": "EU-global_conf.json",
    "region_in865": "IN-global_conf.json",
    "region_kr920": "KR-global_conf.json",
    "region_ru864": "RU-global_conf.json",
    "region_us915": "US-global_conf.json"
shawaj commented 1 year ago

Not sure if you think #116 is a reasonable solution @pritamghanghas ?

pritamghanghas commented 1 year ago

@MuratUrsavas Are any fleets using REGION_OVERRIDE with old value at device level or fleet level. This should not happen if our fleets are updated and there is no REGION_OVERRIDE.

MuratUrsavas commented 1 year ago

@pritamghanghas No, I've not seen that in our current fleets. Checked while moving to open/commercial fleets.

shawaj commented 1 year ago

Could it be that they were running some old miner code or something?

pritamghanghas commented 1 year ago

check the miner with the error. On this device the miner info command returns undefined. The file has some old value. This is just one device. I will just override it for the time being.

/opt/miner # /opt/miner/bin/miner info region undefined