[chirp_devel] [PATCH 2 of 2] Add import from RadioReference.com. Feature #114
Tom Hayward
Tue Apr 10 20:43:32 PDT 2012
On Tue, Apr 10, 2012 at 16:38, Dan Smith <dsmith at danplanet.com> wrote:
> When I run against 97124, I get:
>
>> -- Exception: --
>> Traceback (most recent call last):
>> File "/home/dan/chirp/chirpui/editorset.py", line 270, in do_import
>> self.rthread)
>> File "/home/dan/chirp/chirpui/editorset.py", line 214, in _do_import_locked
>> dialog = dlgclass(src_radio, dst_rthread.radio, self.parent_window)
>> File "/home/dan/chirp/chirpui/importdialog.py", line 594, in __init__
>> self.populate_list()
>> File "/home/dan/chirp/chirpui/importdialog.py", line 516, in populate_list
>> msgs = self.dst_radio.validate_memory(mem)
>> File "/home/dan/chirp/chirp/chirp_common.py", line 908, in validate_memory
>> for char in mem.name:
>> TypeError: 'NoneType' object is not iterable
>> ------
Ah, so mem.name expects "" for an empty name. Fixed.
>> + mem.freq = int(freq.out * 1000 * 1000)
>
> You will want to use chirp_common.parse_freq() here, which takes care
> not to propagate the inevitable error to be had by storing the
> frequencies in IEEE floating point format. Otherwise, you'll get some
> issues with 6.25kHz (at least) channels here.
I didn't use chirp_common.parse_freq() because it requires a str, and
I have a float. But that's fine, I'll just convert to str before
calling chirp_common.parse_freq().
New patch incoming.
Tom KD7LXL
More information about the chirp_devel
mailing list