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 #1

Updated by Tom Hayward over 11 years ago

  • File rbnochanfix.patch rbnochanfix.patch added
  • Status changed from New to In Progress
  • Assignee set to Tom Hayward
  • Target version set to 0.2.4
  • % Done changed from 0 to 100
  • Platform changed from Windows to All

How's this?

Actions #2

Updated by Steven Conley over 11 years ago

Perfecto !

Get a dialog as needed with "No Channels found" and OK button.

BTW - great piece of work! I just got the Baofeng and the supplied software was obviously lacking.
When I found this and that it would work with a wide variety of radios, I was impressed.
And in one of my favorite languages too (Python).
(Although at work I have to program Java/SQL all day).

Actions #3

Updated by Tom Hayward over 11 years ago

  • Status changed from In Progress to Closed

If you're interested in setting up your own dev environment, check out Developers and follow the workflow at DevelopersProcess. We'd love to have you.

Actions #4

Updated by Steven Conley over 11 years ago

Will do. I have the source/compile environment (obviously). Just need to setup the Mecurial environment.

I noticed a few "minor" things using Chirp with the Baofeng - which may be Baofeng's problem versus Chirp.
So I will investigate them further.
And if you need me to test out something with that radio - other than the current build (which I will keep up with on at least a weekly or so basis), I will be happy to.

Thanks, Tom.

Actions

Also available in: Atom PDF