Project

General

Profile

Actions

Bug #4065

closed

Import of a CSV previously exported by Chirp fails - No attribute power in struct

Added by Eugene Tyler about 8 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
Start date:
09/26/2016
Due date:
% Done:

0%

Estimated time:
Chirp Version:
daily
Model affected:
Baofeng BF-F8HP
Platform:
All
Debug Log:
I read the instructions above:

Description

Trying to use CSV import to batch update a Baofeng BF-F8HP frequency list.

Using Daily-20160924 build, running on Linux (Fedora 19) GTK 2.24.22, PyGTK 2.24.0, Python 2.75

Did an File->export of existing radio frequency list, modified it to add new rows (frequencies), then did File->import.

THe following displayed on the console. Had to Force Kill the application:
ERROR: Exception running RadioJob: No attribute power in struct
ERROR: -- Exception: --
ERROR: Traceback (most recent call last):
File "/home/edt/Downloads/chirp-daily-20160924/chirp/ui/common.py", line 116, in execute
result = func(*self.args, **self.kwargs)
File "/home/edt/Downloads/chirp-daily-20160924/chirp/drivers/uv5r.py", line 825, in get_memory
(_mem.power, levels))
File "/home/edt/Downloads/chirp-daily-20160924/chirp/bitwise.py", line 688, in __getattr
_
raise AttributeError("No attribute %s in struct" % name)
AttributeError: No attribute power in struct

ERROR: ----------------
ERROR: Job Args: (10,)
ERROR: Job KWArgs: {}
ERROR: Job Called from:
File "./chirpw", line 146, in
gtk.main()
File "/home/edt/Downloads/chirp-daily-20160924/chirp/ui/mainapp.py", line 482, in cb_clonein
self.do_open_live(radio, tempname="(" + ("Untitled") + ")")
File "/home/edt/Downloads/chirp-daily-20160924/chirp/ui/mainapp.py", line 407, in do_open_live
eset = editorset.EditorSet(radio, self, tempname=tempname)
File "/home/edt/Downloads/chirp-daily-20160924/chirp/ui/editorset.py", line 144, in __init
_
self.make_device_editors(device, devrthread, index)
File "/home/edt/Downloads/chirp-daily-20160924/chirp/ui/editorset.py", line 79, in _make_device_editors
memories = memedit.MemoryEditor(devrthread)
File "/home/edt/Downloads/chirp-daily-20160924/chirp/ui/memedit.py", line 1376, in __init
_
self.prefill()
File "/home/edt/Downloads/chirp-daily-20160924/chirp/ui/memedit.py", line 1063, in prefill
job = common.RadioJob(handler, "get_memory", i)

ERROR: Exception running RadioJob: No attribute power in struct
ERROR: -- Exception: --
ERROR: Traceback (most recent call last):
File "/home/edt/Downloads/chirp-daily-20160924/chirp/ui/common.py", line 116, in execute
result = func(*self.args, **self.kwargs)
File "/home/edt/Downloads/chirp-daily-20160924/chirp/drivers/uv5r.py", line 825, in get_memory
(_mem.power, levels))
File "/home/edt/Downloads/chirp-daily-20160924/chirp/bitwise.py", line 688, in __getattr
_
raise AttributeError("No attribute %s in struct" % name)
AttributeError: No attribute power in struct

ERROR: ----------------
ERROR: Job Args: (10,)
ERROR: Job KWArgs: {}
ERROR: Job Called from:
File "./chirpw", line 146, in
gtk.main()
File "/home/edt/Downloads/chirp-daily-20160924/chirp/ui/memedit.py", line 1204, in
refresh.connect("clicked", lambda x: self.prefill())
File "/home/edt/Downloads/chirp-daily-20160924/chirp/ui/memedit.py", line 1063, in prefill
job = common.RadioJob(handler, "get_memory", i)

ERROR: -- Exception: --
ERROR: Traceback (most recent call last):
File "/home/edt/Downloads/chirp-daily-20160924/chirp/ui/editorset.py", line 336, in do_import
self.rthread)
File "/home/edt/Downloads/chirp-daily-20160924/chirp/ui/editorset.py", line 252, in do_import_locked
dialog = dlgclass(src_radio, dst_rthread.radio, self.parent_window)
File "/home/edt/Downloads/chirp-daily-20160924/chirp/ui/importdialog.py", line 634, in __init
_
self.populate_list()
File "/home/edt/Downloads/chirp-daily-20160924/chirp/ui/importdialog.py", line 575, in populate_list
self.record_use_of(mem.number)
File "/home/edt/Downloads/chirp-daily-20160924/chirp/ui/importdialog.py", line 515, in record_use_of
mem = self.dst_radio.get_memory(number)
File "/home/edt/Downloads/chirp-daily-20160924/chirp/drivers/uv5r.py", line 825, in get_memory
(mem.power, levels))
File "/home/edt/Downloads/chirp-daily-20160924/chirp/bitwise.py", line 688, in __getattr
_
raise AttributeError("No attribute %s in struct" % name)
AttributeError: No attribute power in struct

ERROR: ----------------
Killed


Files

radio-mod1a.csv (918 Bytes) radio-mod1a.csv Eugene Tyler, 09/27/2016 10:48 PM
Baofeng_BF-F8HP_20160926.img (6.32 KB) Baofeng_BF-F8HP_20160926.img Eugene Tyler, 09/27/2016 10:49 PM
Actions #1

Updated by Jim Unroe about 8 years ago

  • Status changed from New to Feedback

You probably broke the CSV file when you edited it. You should attach it to this issue so we can examine it.

Jim KC9HI

Actions #2

Updated by Eugene Tyler about 8 years ago

I have attached the .img file and the .csv file I tried to import into it. The import fails and then Chirp hangs and has to be killed.

Here is the console output from loading the .img file, which was created using Chirp. Note the "no attribute power" error is shown in the log, even though I had not yet imported anything. Perhaps the trouble is not in the import, but in the .img file?
./chirpw
WARNING: Bandplan North American Band Plan has duplicates [1800000-2000000 160 Meter Band simplex , 1800000-2000000 160 Meter Band simplex mode: CW ]
WARNING: Bandplan North American Band Plan has duplicates [1800000-1810000 Digimodes simplex , 1800000-1810000 Digital Modes simplex ]
WARNING: Bandplan North American Band Plan has duplicates [1999000-2000000 Beacons simplex mode: CW , 1999000-2000000 Beacons simplex ]
WARNING: Bandplan North American Band Plan has duplicates [3500000-4000000 80 Meter Band simplex , 3500000-4000000 80 Meter Band simplex ]
WARNING: Bandplan North American Band Plan has duplicates [7000000-7300000 40 Meter Band simplex , 7000000-7300000 40 Meter Band simplex ]
WARNING: Bandplan North American Band Plan has duplicates [10100000-10150000 30 Meter Band simplex , 10100000-10150000 30 Meter Band simplex ]
WARNING: Bandplan North American Band Plan has duplicates [10130000-10140000 All narrow band digimodes simplex , 10130000-10140000 RTTY simplex mode: RTTY ]
WARNING: Bandplan North American Band Plan has duplicates [10140000-10150000 All modes, digimodes, no phone simplex , 10140000-10150000 Packet simplex ]
WARNING: Bandplan North American Band Plan has duplicates [14000000-14350000 20 Meter Band simplex , 14000000-14350000 20 Meter Band simplex ]
WARNING: Bandplan North American Band Plan has duplicates [18068000-18168000 17 Meter Band simplex , 18068000-18168000 17 Meter Band simplex ]
WARNING: Bandplan North American Band Plan has duplicates [21000000-21450000 15 Meter Band simplex , 21000000-21450000 15 Meter Band simplex ]
WARNING: Bandplan North American Band Plan has duplicates [24890000-24990000 12 Meter Band simplex , 24890000-24990000 12 Meter Band simplex ]
WARNING: Bandplan North American Band Plan has duplicates [28000000-28070000 CW simplex mode: CW , 28000000-28070000 CW simplex mode: CW ]
WARNING: Bandplan North American Band Plan has duplicates [28150000-28190000 All narrow band modes, digimodes simplex , 28150000-28190000 CW simplex mode: CW ]
WARNING: Bandplan North American Band Plan has duplicates [29000000-29200000 All modes, AM preferred simplex mode: AM , 29000000-29200000 AM simplex mode: AM ]
WARNING: Bandplan North American Band Plan has duplicates [29300000-29510000 Satellite downlink simplex , 29300000-29510000 Satellite Downlinks simplex ]
WARNING: Bandplan North American Band Plan has duplicates [1800000-2000000 160 Meter Band simplex , 1800000-2000000 160 Meter Band simplex mode: CW ]
WARNING: Bandplan North American Band Plan has duplicates [1800000-1810000 Digimodes simplex , 1800000-1810000 Digital Modes simplex ]
WARNING: Bandplan North American Band Plan has duplicates [1999000-2000000 Beacons simplex mode: CW , 1999000-2000000 Beacons simplex ]
WARNING: Bandplan North American Band Plan has duplicates [3500000-4000000 80 Meter Band simplex , 3500000-4000000 80 Meter Band simplex ]
WARNING: Bandplan North American Band Plan has duplicates [7000000-7300000 40 Meter Band simplex , 7000000-7300000 40 Meter Band simplex ]
WARNING: Bandplan North American Band Plan has duplicates [10100000-10150000 30 Meter Band simplex , 10100000-10150000 30 Meter Band simplex ]
WARNING: Bandplan North American Band Plan has duplicates [10130000-10140000 All narrow band digimodes simplex , 10130000-10140000 RTTY simplex mode: RTTY ]
WARNING: Bandplan North American Band Plan has duplicates [10140000-10150000 All modes, digimodes, no phone simplex , 10140000-10150000 Packet simplex ]
WARNING: Bandplan North American Band Plan has duplicates [14000000-14350000 20 Meter Band simplex , 14000000-14350000 20 Meter Band simplex ]
WARNING: Bandplan North American Band Plan has duplicates [18068000-18168000 17 Meter Band simplex , 18068000-18168000 17 Meter Band simplex ]
WARNING: Bandplan North American Band Plan has duplicates [21000000-21450000 15 Meter Band simplex , 21000000-21450000 15 Meter Band simplex ]
WARNING: Bandplan North American Band Plan has duplicates [24890000-24990000 12 Meter Band simplex , 24890000-24990000 12 Meter Band simplex ]
WARNING: Bandplan North American Band Plan has duplicates [28000000-28070000 CW simplex mode: CW , 28000000-28070000 CW simplex mode: CW ]
WARNING: Bandplan North American Band Plan has duplicates [28150000-28190000 All narrow band modes, digimodes simplex , 28150000-28190000 CW simplex mode: CW ]
WARNING: Bandplan North American Band Plan has duplicates [29000000-29200000 All modes, AM preferred simplex mode: AM , 29000000-29200000 AM simplex mode: AM ]
WARNING: Bandplan North American Band Plan has duplicates [29300000-29510000 Satellite downlink simplex , 29300000-29510000 Satellite Downlinks simplex ]
ERROR: Exception running RadioJob: No attribute power in struct
ERROR: -- Exception: --
ERROR: Traceback (most recent call last):
File "/home/edt/Downloads/chirp-daily-20160924/chirp/ui/common.py", line 116, in execute
result = func(*self.args, **self.kwargs)
File "/home/edt/Downloads/chirp-daily-20160924/chirp/drivers/uv5r.py", line 825, in get_memory
(_mem.power, levels))
File "/home/edt/Downloads/chirp-daily-20160924/chirp/bitwise.py", line 688, in __getattr
_
raise AttributeError("No attribute %s in struct" % name)
AttributeError: No attribute power in struct

ERROR: ----------------
ERROR: Job Args: (10,)
ERROR: Job KWArgs: {}
ERROR: Job Called from:
File "./chirpw", line 146, in
gtk.main()
File "/home/edt/Downloads/chirp-daily-20160924/chirp/ui/mainapp.py", line 1424, in mh
self.do_open()
File "/home/edt/Downloads/chirp-daily-20160924/chirp/ui/mainapp.py", line 366, in do_open
tempname=tempname)
File "/home/edt/Downloads/chirp-daily-20160924/chirp/ui/editorset.py", line 144, in init
self.make_device_editors(device, devrthread, index)
File "/home/edt/Downloads/chirp-daily-20160924/chirp/ui/editorset.py", line 79, in _make_device_editors
memories = memedit.MemoryEditor(devrthread)
File "/home/edt/Downloads/chirp-daily-20160924/chirp/ui/memedit.py", line 1376, in __init
_
self.prefill()
File "/home/edt/Downloads/chirp-daily-20160924/chirp/ui/memedit.py", line 1063, in prefill
job = common.RadioJob(handler, "get_memory", i)

I also did tests with a more updated .img file (more channels):
To test this case with cleaner files, I did an export, then an immediate import. This worked. Next I duplicated the last line of the file and did an import. This also worked. I did take care to ensure that the frequency, offset, tone and step columns were not stripped of trailing zeros (to the right of the decimal point). I did not do this previously.

As a suggestion, the error message was a little confusing, because the H/M/L column was not exported, I do not understand how the message was generated.

Actions #3

Updated by Eugene Tyler about 8 years ago

Here is the .img file

Actions #4

Updated by Tom Hayward about 8 years ago

Looks like this is an issue with the img data and BF-F8HP code only, not the CSV. The problem is that memory channel 10 in the img has data that Chirp doesn't understand. Normally, an empty memory channel will be full of ones (@\xFF@). In this img, memory channel 10 has another value in the rxfreq field but @\xFF@ everywhere else. When Chirp tries to interpret this, it produces a number of errors. One of those errors also triggers a typo in Chirp where @_mem.power@ is referenced instead of @_mem.lowpower@.

You can clean up the img by selecting channel 10 (single click on the name column "ERROR") and then hitting the delete key. Now you can import the CSV.

Actions #5

Updated by Jim Unroe about 8 years ago

  • Status changed from Feedback to In Progress
  • Assignee set to Jim Unroe
  • Chirp Version changed from 0.4.0 to daily
  • Platform changed from Linux to All

Thanks for catching that Tom. I will see if I can spin up a patch later this evening.

JIm

Actions #6

Updated by Bernhard Hailer over 4 years ago

  • Status changed from In Progress to Closed
  • Model affected changed from (All models) to Baofeng BF-F8HP

This appears to be complete.

Actions

Also available in: Atom PDF