Help with CSV import to Subsurface: Keep getting red X at bottom fo screen

32 views
Skip to first unread message

DevilEyeDog

unread,
Jun 25, 2020, 2:59:55 PM6/25/20
to Subsurface Divelog
Using a mac desktop. I have a csv file. I have chosen Import Log Files. I select the CSV file. I move around the headings. The I click OK and am greeted with "Failed to parse" in red.

1) Does it help to make the CSV file formatted to the right columns that Subsurface is expecting (I can easily move the columns to match the interface of Subsurface, but I can't seem to find any template on what that would look like)

2) The CSV data is from Diviac with 200+ dives logged on it. 

Lastly, I don't write code, know who this code is or even where to find him so if we start talking about code I fear I shall be lost. 
Thanks for your help!

Dirk Hohndel

unread,
Jun 25, 2020, 4:36:01 PM6/25/20
to subsurfac...@googlegroups.com, Miika Turkia
Thanks for sending this here. I am copying the developer who wrote almost all of the import code, but it's already very late in Finland...

Usually Subsurface will give you some additional information when run from a terminal that will help understand what's going wrong, but if you are uncomfortable messing with things like that, you could also just send the CSV to Miika or myself (so NOT to the forum - watch out for the Reply-To headers) so we can try and figure it out.

Happy to help

/D


Miika Turkia

unread,
Jun 26, 2020, 3:41:27 AM6/26/20
to Dirk Hohndel, Subsurface Divelog
The order in which you have the columns should not have any effect on the import. The problem might be e.g. a special character that is not handled correctly in the import, or having extra field limiter in notes field without proper quoting. Output on the terminal from where you start Subsurface might reveal what the problem is. If you send me a sample log, I can take a look to see if it is a bug in Subsurface that could be fixed.

If you want to see the "native" order of columns in Subsurface, export a dive into CSV. You will see the order of fields in the first line of the export. Even though the order should not matter, importing our native format is actually done in different import "function" and it supports slightly more stuff than the basic CSV import (for native Subsurface format, you need to select it from a drop down menu in import, and any field configurations are then ignored, as the order of fields is known).
Reply all
Reply to author
Forward
0 new messages