Project

General

Profile

Actions

Bug #11303

closed

UTF-8 Import Problems (Mac OS -> Generated from Excel)

Added by Matt Bickford 7 months ago. Updated 7 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
Start date:
04/14/2024
Due date:
% Done:

100%

Estimated time:
Chirp Version:
next
Model affected:
N/A
Platform:
MacOS
I read the instructions above:
Yes

Description

Exporting a file from Excel with the UTF-8 option (The first one in the dropdown) results in an unimportable file with an error of "Unknown File Format".

[2024-04-14 19:05:01,558] chirp.wxui.common - ERROR: : Unknown file format

When exported with the generic CSV option further down the same file will open file.

diff'ing the two files shows that the header is different but it appears identical.

Using 4/13 build currently (although it also happens on older builds) as well.


Files

UTF8 Test (UTF8).csv (322 Bytes) UTF8 Test (UTF8).csv Non Working Matt Bickford, 04/14/2024 05:09 PM
UTF8 Test (NonUTF8).csv (319 Bytes) UTF8 Test (NonUTF8).csv Working Excel Export Matt Bickford, 04/14/2024 05:09 PM
generic_csv.py (17.2 KB) generic_csv.py fea88606 Dan Smith, 04/14/2024 05:46 PM
Actions #1

Updated by Dan Smith 7 months ago

Hmm, can confirm, will investigate, thanks.

Actions #2

Updated by Dan Smith 7 months ago

  • Status changed from New to In Progress
  • Assignee set to Dan Smith
  • Target version set to chirp-py3

Ah, I got it. The recent(ish) change to allow comments in the CSV file will fail to detect the file if it has a BOM (which Excel is adding apparently). The file will still load (which is why the test passes) but the detection logic won't actually see the file as a CSV in the UI and thus never even tries to load it as one. So I'll fix that up and add a BOM-having detection test as well. This would have worked between when it was originally fixed and January of this year when the comment stuff was added :)

Actions #3

Updated by Dan Smith 7 months ago

Okay, if you want to give this a shot and confirm it works for you, that'd be great. Instructions are here: LoadingTestModules

It lets me load your "non working" file. Be sure to start a fresh chirp, load the module, then try opening the file. Please capture a fresh debug log after if it doesn't work for some reason.

Thanks!

Actions #4

Updated by Matt Bickford 7 months ago

Works like a champ! Nice work!

Actions #5

Updated by Dan Smith 7 months ago

Cool, thanks for the report and confirmation. I'll get this integrated into the next build sometime this week.

Actions #6

Updated by Dan Smith 7 months ago

  • Status changed from In Progress to Closed
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF