Bug 327219 - csv import module reports date error if there is a header line
Summary: csv import module reports date error if there is a header line
Status: RESOLVED WORKSFORME
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: 4.6.3
Platform: Kubuntu Linux
: NOR minor
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-06 11:30 UTC by Martin Tlustos
Modified: 2013-11-06 17:18 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
problem test case (4.91 KB, text/csv)
2013-11-06 15:32 UTC, Martin Tlustos
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Tlustos 2013-11-06 11:30:45 UTC
the csv import module does not import data if above the data to be imported are lines that don't match the date settings, even if these lines have been excluded from the import (e.g. only lines 3-100 are to be imported, but line 1 is  a header line and line 2 is empty).

Workaround: delete the lines above the data that is to be imported.

Reproducible: Always
Comment 1 allan 2013-11-06 11:58:46 UTC
On 06/11/13 11:30, Martin Tlustos wrote:
> https://bugs.kde.org/show_bug.cgi?id=327219
>
>              Bug ID: 327219
>             Summary: csv import module reports date error if there is a
>                      header line
>      Classification: Unclassified
>             Product: kmymoney4
>             Version: 4.6.3
>            Platform: Kubuntu Packages
>                  OS: Linux
>              Status: UNCONFIRMED
>            Severity: minor
>            Priority: NOR
>           Component: general
>            Assignee: kmymoney-devel@kde.org
>            Reporter: martin.tlustos@gmail.com
>
> the csv import module does not import data if above the data to be imported are
> lines that don't match the date settings, even if these lines have been
> excluded from the import (e.g. only lines 3-100 are to be imported, but line 1
> is  a header line and line 2 is empty).
>
> Workaround: delete the lines above the data that is to be imported.
>
> Reproducible: Always
>

I've just tested this in 4.6.3 and do not see any problem.  I imported a 
file with a blank line then a header followed by another blank line then 
three lines of data.  The blank lines don't appear in the plugin, just 
the header and the data.  Deleting the initial blank line made no 
difference, nor deleting the second.

This is very fundamental to the plugin and I've never seen that problem.

If you're sure you can see no problem in your file, are you able to 
disguise personal details and send it off-list to me.  I'm in the UK, so 
perhaps that's a factor in your problem.  I only need to see a few 
lines, as long as the format is retained, and as long as you still see 
the problem.

Allan
Comment 2 allan 2013-11-06 12:02:27 UTC
On 06/11/13 11:30, Martin Tlustos wrote:
> https://bugs.kde.org/show_bug.cgi?id=327219
>
>              Bug ID: 327219
>             Summary: csv import module reports date error if there is a
>                      header line
>      Classification: Unclassified
>             Product: kmymoney4
>             Version: 4.6.3
>            Platform: Kubuntu Packages
>                  OS: Linux
>              Status: UNCONFIRMED
>            Severity: minor
>            Priority: NOR
>           Component: general
>            Assignee: kmymoney-devel@kde.org
>            Reporter: martin.tlustos@gmail.com
>
> the csv import module does not import data if above the data to be imported are
> lines that don't match the date settings, even if these lines have been
> excluded from the import (e.g. only lines 3-100 are to be imported, but line 1
> is  a header line and line 2 is empty).
>
> Workaround: delete the lines above the data that is to be imported.
>
> Reproducible: Always
>

PS I have seen a date error reported if there is a trailer line that has 
been overlooked, but that doesn't tie in with you reported avoidance.

Allan
Comment 3 Martin Tlustos 2013-11-06 15:32:07 UTC
Created attachment 83377 [details]
problem test case

It might be that indeed the problem is caused by a trailer line that has no date in it. If I restrict lines to be imported to 3-100, but lin 101 is a line that has no date, the selection bounces back to 3-101...
Comment 4 allan 2013-11-06 17:18:51 UTC
(In reply to comment #3)
> Created attachment 83377 [details]
> problem test case
> 
> It might be that indeed the problem is caused by a trailer line that has no
> date in it. If I restrict lines to be imported to 3-100, but lin 101 is a
> line that has no date, the selection bounces back to 3-101...

Yes, the trailer line does seem to be the problem for you, but I was able to import your file successfully.

Initially, after loading the file, the Settings tab shows the end line number as 101, but I edited it to 100 without it 'bouncing back'.  When I clicked import, it threw a message that a row didn't have the expected number of fields, (the first line has 9 columns and the rest have 8), but I accepted "all", and the import proceeded.  The values were all wrong, but that was because I didn't notice at first that your decimal separator is a comma and I'd left it as dot.  Having changed that and re-importing, all went well.

Hopefully, you should now be able to import successfully.  After you change the end line number, remember to click return or change focus to accept it.

Any more trouble, just let us know.