Bug 468208 - Cannot import csv
Summary: Cannot import csv
Status: RESOLVED FIXED
Alias: None
Product: LabPlot2
Classification: Applications
Component: general (show other bugs)
Version: 2.9.0
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: Alexander Semke
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-04-06 14:25 UTC by Martin Tlustos
Modified: 2023-04-15 08:23 UTC (History)
0 users

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


Attachments
sample file (202.36 KB, text/plain)
2023-04-11 12:24 UTC, Martin Tlustos
Details
UTF8 encoded file (101.06 KB, text/csv)
2023-04-13 06:32 UTC, Alexander Semke
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Tlustos 2023-04-06 14:25:27 UTC
SUMMARY
I cannot import my weather data into labplot. It is in csv format, with the first line being a description. When trying to import, it tells me: no data to be imported. I tried automatic and manual settings, but to no avail.

STEPS TO REPRODUCE
1. Open labplot
2.  create new table
3. "import data - from file - select file" - click ok.

OBSERVED RESULT
"No data to be imported

EXPECTED RESULT
Data should be imported

SOFTWARE/OS VERSIONS
Operating System: KDE neon 5.27
KDE Plasma Version: 5.27.3
KDE Frameworks Version: 5.104.0
Qt Version: 5.15.8
Kernel Version: 5.19.0-38-generic (64-bit)
Graphics Platform: X11
Processors: 6 × AMD Ryzen 5 4500U with Radeon Graphics
Memory: 15.0 GiB of RAM
Graphics Processor: AMD Radeon Graphics
Manufacturer: Acer
Product Name: Aspire A515-44G
System Version: V1.12

ADDITIONAL INFORMATION
Comment 1 Alexander Semke 2023-04-07 11:29:59 UTC
(In reply to Martin Tlustos from comment #0)
> SUMMARY
> I cannot import my weather data into labplot. It is in csv format, with the
> first line being a description. When trying to import, it tells me: no data
> to be imported. I tried automatic and manual settings, but to no avail.
Did you use the proper separator character? If yes and you're still not getting any data shown in the preview tab, does it help if you close the dialog and open it again?
Comment 2 Martin Tlustos 2023-04-11 12:24:07 UTC
I have tried manual settings to match the csv, and I tried closing and reopening the dialog. No luck. I will upload a sample file (smaller), that also didn't work.
Comment 3 Martin Tlustos 2023-04-11 12:24:57 UTC
Created attachment 158013 [details]
sample file
Comment 4 Martin Tlustos 2023-04-11 13:17:05 UTC
I tried the flatpak version (2.10.0), but it didn't work either (and it crashed when I tried to import it in xlsx format, but that's another issue...)
Comment 5 Martin Tlustos 2023-04-11 13:18:41 UTC
Also, I played around with the preview a bit. If I turn on "first line are names" (or similar, I use German), then nothing is shown. If I turn this of, then only a 0 is shown in the first line (index).
I tried pretty much every option in the settings. Changing date/time, generate index, convert NaN to 0, etc...
Comment 6 Alexander Semke 2023-04-13 06:32:48 UTC
Created attachment 158061 [details]
UTF8 encoded file
Comment 7 Alexander Semke 2023-04-13 06:40:54 UTC
(In reply to Martin Tlustos from comment #5)
> Also, I played around with the preview a bit. If I turn on "first line are
> names" (or similar, I use German), then nothing is shown. If I turn this of,
> then only a 0 is shown in the first line (index).
> I tried pretty much every option in the settings. Changing date/time,
> generate index, convert NaN to 0, etc...
This seems to be an issue with the UTF16 encoding that we already track in https://invent.kde.org/education/labplot/-/issues/541. I attached your file in UTF8, please try with it. You need to use 'yyyy-MM-dd hh:mm:ss' for the DateTime format for your data and comma as the separator character. The preview is sometimes not properly refreshed, closing the dialog and opening it again solves this problem - this is another problem that we'll check.
Comment 8 Martin Tlustos 2023-04-13 09:00:18 UTC
OK, opening the original big file in libreoffice and saving it as utf-8 solved the problem with the import. Now I just have to figure out how to use it... ;-) (I'm a noob in statistical analysis).
Thanks for the help!
Comment 9 Alexander Semke 2023-04-15 08:23:42 UTC
(In reply to Martin Tlustos from comment #8)
> OK, opening the original big file in libreoffice and saving it as utf-8
> solved the problem with the import. Now I just have to figure out how to use
> it... ;-) (I'm a noob in statistical analysis).
> Thanks for the help!
Ok, thanks for the confirmation it works for you with utf8. Let me close this ticket now, we'll finalize the bug fix in https://invent.kde.org/education/labplot/-/issues/541. In case you need any further help with how to use labplot, you can also reach out to us on our Matrix room.