Project

General

Profile

Actions

Bug #433

closed

Query/Import RepeaterBook fails uncleanly if no repeaters found in specified filters

Added by Steven Conley over 11 years ago. Updated over 11 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
Start date:
01/16/2013
Due date:
% Done:

100%

Estimated time:
Chirp Version:
0.2.3
Model affected:
(All models)
Platform:
All
Debug Log:
I read the instructions above:

Description

Open Chirp
Menu/Radio/Query Data Source
RepeaterBook

Specify (example): Tennessee, William County, 2 Meters.

You will get the "busy" "blue ring" - and it never goes away.

This is due to the fact that no repeaters are returned.

-- Exception: --
Traceback (most recent call last):
File "E:\Dev\Chirp\chirp.hg\chirpui\mainapp.py", line 856, in do_repeaterbook
radio = RBRadio(filename)
File "E:\Dev\Chirp\chirp.hg\chirp\generic_csv.py", line 84, in init
self.load()
File "E:\Dev\Chirp\chirp.hg\chirp\generic_csv.py", line 178, in load
raise errors.InvalidDataError("No channels found")

InvalidDataError: No channels found

Traceback (most recent call last):
File "E:\Dev\Chirp\chirp.hg\chirpui\mainapp.py", line 1247, in mh
self.do_repeaterbook(action[0] == "i")
File "E:\Dev\Chirp\chirp.hg\chirpui\mainapp.py", line 865, in do_repeaterbook
reporting.report_model_usage(radio, "import", True)
UnboundLocalError: local variable 'radio' referenced before assignment

IF the line at chirp.hg\chirpui\mainapp.py 865:
reporting.report_model_usage(radio, "import", True)
is moved up two lines to just before the exception, so that it is like this:
try:
# Validate CSV
radio = RBRadio(filename)
if radio.errors:
reporting.report_misc_error("repeaterbook",
("query=%s\n" % query) +
("\n") +
("\n".join(radio.errors)))
reporting.report_model_usage(radio, "import", True)
except Exception, e:
common.log_exception()

Then the circle disappears as appropriate after the failure.
I am totally new to this project and did not know the "procedure" for making changes or whether I even could.
I just installed an hour ago and traced down the issue.
It should also display a message indicating nothing found, and I will work on that next.
www.swclogic.com W4SWC Baufeng UV5R latest firmware BFB297 (I think latest)


Files

rbnochanfix.patch (834 Bytes) rbnochanfix.patch Tom Hayward, 01/16/2013 11:43 AM
Actions

Also available in: Atom PDF