[chirp_users] Chirp won't read CSV files correctly
Chris Nordstrom
Sat Feb 27 19:50:18 PST 2016
Dave,
I believe you about what Chirp is expecting, but when I run Chirp,
choose /*File/New*/ to create a new empty CSV file, then I save that
file, the resulting CSV file contains the extra commas at the end of the
row. I use FileViewer to look at the raw text; this file has not been
touched by Excel, yet contains the same extra commas.
I already discovered that if I delete the unused columns in Excel and
re-import, the column number mismatch error is gone.
And I have to disagree-- the whole benefit of a program like this is to
be able to manipulate (change) some data in order to customize my memory
list, and I bet that's what most users are looking for.
Regards, Chris W7CFN
On 2/27/2016 2:30 PM, Dave VK2FDJS wrote:
> If you are editing CSV files, it is important that you use a text
> editor to at least inspect the results of the edit. In the event of
> problems using a CSV file modified in a third-party program (e.g.
> Excel), it becomes VITAL that you inspect the file in a text editor.
> CSV files are text files, not Excel files. Excel can make use of
> them, but there is no reason to expect it to maintain a presupposed
> file format. In particular, there is no concept in a CSV file of a
> header row naming columns or a fixed number of "columns" per line.
> In your case, here are the two rows at the position of the problem:
> 15,SARO-U,444.1,+,5,Tone,179.9,88.5,23,NN,FM,5,,,,,
> 16,SARO-U,444.125,+,5,Tone,179.9,88.5,23,NN,FM,5
> As you can see, the line beginning with "15," which is the 16th line
> in the file, ends with a series of commas. These separate the last 5
> values in the line, which all happen to be empty.
> The line beginning with "16," - and subsequent lines - are lacking
> these 5 commas and accordingly contain five fewer values per line.
> Because CHIRP is expecting more values per line than you gave it, it
> doesn't know what to do, and hands the problem back to you with the
> "column number mismatch" error message. (Certainly it would be nice
> if the error message was a bit more informative - e.g. by including
> the number of values expected and the number of values actually in the
> line - perhaps the programmers can improve the error message.)
> When I look at the file from yesterday (from which you had removed
> column headings), there are no trailing commas in any of the lines. I
> assume these were removed by Excel, but can't know for sure.
> As a simple rule of thumb, only work on CSV files in the program that
> actually created them. If you do this, you are unlikely to have
> problems with them. As I understand it, the idea of CHIRP's CSV files
> is to allow you to copy entire sets of frequencies from one radio
> image to another, not to allow you to manipulate the frequency sets in
> third-party programs like Excel. (Like all rules, this is, of course,
> meant to be broken ... but caveat emptor.)
>
> Regards, Dave VK2FDJS
>
> ----- Original Message -----
> *From:* Chris Nordstrom <mailto:cfnordstrom at gmail.com>
> *To:* chirp_users at intrepid.danplanet.com
> <mailto:chirp_users at intrepid.danplanet.com>
> *Sent:* Sunday, February 28, 2016 5:17 AM
> *Subject:* Re: [chirp_users] Chirp won't read CSV files correctly
>
> Dave,
>
> Yup, success! When I put 88.5 in the */rToneFreq/* column (also
> used 67, I guess any valid tone freq) _/and/_ deleted column
> headers from any column that contains no data _/and/_ entered the
> correct number of rows in *Memory Range*---badda bing -- it works.
>
>
> I also figured out that I cannot directly /*Upload*/ a CSV file to
> the radio, it has to be an IMG file, which makes sense, but the
> method for getting an IMG file is not obvious and with no
> documentation (that I could find), eew! So what I did was
> */Download/* from the radio, delete all except the first row, save
> it as an "Empty" IMG file. Next, I */Open/* that IMG file then
> /*Import*/ the CSV file containing the memory channel data I want,
> and magically, it becomes an IMG file that I can now /*Upload*/ to
> the radio. Is this how it is supposed to work or is there another
> way to do this? Does it work basically the same regardless of the
> radio brand?
>
> Attached is the CSV file that causes the Column number mismatch
> error. The only difference between this file and the one that
> successfully imports is that there*IS* column heading text in
> columns M, N, O, P and Q, but there is no data in those columns.
> When I removed the heading text from just those columns, the
> problem goes away.
>
> Thanks for your encouragement and ideas,
>
> Regards, Chris W7CFN
>
> P.S. Is there no one working on some basic documentation? Perhaps
> I can contribute something, it's been pretty painful for me.
>
>
> On 2/26/2016 10:43 PM, Dave VK2FDJS wrote:
>> I assume the file you attached was the one that gave you the
>> second (smaller) set of errors.
>> If you look at it in Excel, you'll see that rows 33, 35 and 40
>> are the only rows that have nothing in the rToneFreq and
>> cToneFreq columns.
>> There are two other rows that have nothing in the Tone column
>> (rows 2 and 3), but these still have values in the other two
>> columns. Looks like you have to have a value of some sort in
>> these two columns.
>> Could you please post the file that gave you the errors from row
>> 17 on, so we can have a look at it too.
>>
>> Regards, Dave VK2FDJS
>>
>> ----- Original Message -----
>> *From:* Chris Nordstrom <mailto:cfnordstrom at gmail.com>
>> *To:* chirp_users at intrepid.danplanet.com
>> *Sent:* Saturday, February 27, 2016 4:15 PM
>> *Subject:* Re: [chirp_users] Chirp won't read CSV files correctly
>>
>> This is the error I get when importing or opening my CSV file:
>>
>> I'm using a file that was generated by Chirp using the export
>> function, then (In Excel) I copy/paste my channels into that
>> CSV file. When opened in Chirp using either File/Open or
>> File/Import, same errors every time.
>>
>> So, a little experimentation and I discover that it doesn't
>> like the empty columns to the right (where there is a column
>> heading but nothing in the column). So I deleted the column
>> headers (that Chirp created!) for the columns with no data
>> and voila, it got past that error. Now I get this one:
>>
>>
>> The new error about line 33 "[rTone] could not convert string
>> to float" I generally get what this error means but don't
>> get what exactly is causing it. And why does it reference
>> line 33 and only import up to memory channel 25? I notice at
>> the top of the memory list window is an item called "Memories
>> Memory Range" where the default entries are 1 to 25. Bingo!
>> I changed the top end to 39 and it imported all the rows in
>> my CSV file. Wow, I know, there is a disclaimer about how
>> you guys are good at programming and not so much at
>> documentation. Not sure I agree with that and the
>> documentation part seems like a cop out.
>>
>> I can't say never, but rarely have I encountered a program so
>> unintuitive and persnickity. I know, I know, it's free, what
>> do I want for nothing. I guess I need to lower my expectations.
>>
>> Chris Nordstrom
>>
>>
>>
>>
>>
>>
>>
>> ------------------------------------------------------------------------
>> _______________________________________________
>> chirp_users mailing list
>> chirp_users at intrepid.danplanet.com
>> http://intrepid.danplanet.com/mailman/listinfo/chirp_users
>> This message was sent to Dave VK2FDJS at vk2fdjs at gmail.com
>> To unsubscribe, send an email to
>> chirp_users-unsubscribe at intrepid.danplanet.com
>> ------------------------------------------------------------------------
>>
>> No virus found in this message.
>> Checked by AVG - www.avg.com <http://www.avg.com>
>> Version: 2015.0.6189 / Virus Database: 4537/11703 - Release
>> Date: 02/26/16
>>
>>
>>
>> _______________________________________________
>> chirp_users mailing list
>> chirp_users at intrepid.danplanet.com
>> http://intrepid.danplanet.com/mailman/listinfo/chirp_users
>> This message was sent to Chris atcfnordstrom at gmail.com
>> To unsubscribe, send an email tochirp_users-unsubscribe at intrepid.danplanet.com
>
> ------------------------------------------------------------------------
> _______________________________________________
> chirp_users mailing list
> chirp_users at intrepid.danplanet.com
> http://intrepid.danplanet.com/mailman/listinfo/chirp_users
> This message was sent to Dave VK2FDJS at vk2fdjs at gmail.com
> To unsubscribe, send an email to
> chirp_users-unsubscribe at intrepid.danplanet.com
>
> ------------------------------------------------------------------------
>
> No virus found in this message.
> Checked by AVG - www.avg.com <http://www.avg.com>
> Version: 2015.0.6189 / Virus Database: 4537/11706 - Release Date:
> 02/27/16
>
>
>
> _______________________________________________
> chirp_users mailing list
> chirp_users at intrepid.danplanet.com
> http://intrepid.danplanet.com/mailman/listinfo/chirp_users
> This message was sent to Chris at cfnordstrom at gmail.com
> To unsubscribe, send an email to chirp_users-unsubscribe at intrepid.danplanet.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://intrepid.danplanet.com/pipermail/chirp_users/attachments/20160227/df4221ff/attachment.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 14616 bytes
Desc: not available
Url : http://intrepid.danplanet.com/pipermail/chirp_users/attachments/20160227/df4221ff/attachment.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 12160 bytes
Desc: not available
Url : http://intrepid.danplanet.com/pipermail/chirp_users/attachments/20160227/df4221ff/attachment-0001.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 12012 bytes
Desc: not available
Url : http://intrepid.danplanet.com/pipermail/chirp_users/attachments/20160227/df4221ff/attachment-0002.png
More information about the chirp_users
mailing list