The text file with the table is not imported in LabPlot2

After the update, it is not possible to import data from a text file. The ASCII data type. When trying to import data from various text files, the same message appears: “Failed to open the device/file or it’s empty.”
On older versions of LabPlot2, everything worked.
How can this problem be solved?

does it work for you if you close the dialog and open it again or select a different file? If not, can you please do a screenshots of your import settings?

I tried different files, changed the names of the files and their location. These files were imported exactly under the old version. Moreover, in a prewiev, LabPlot2 correctly identifies the table. Here are the screenshot

Ok, something is wrong here, yes. But the Ok-Button is enabled and you should be able to import the data actually, check the preview of it first maybe. Does the import work for you despite this error message shown in the dialog?

The preview of the table correctly identifies and displays it. However, when you click on the “Ok” button (even repeatedly), this message appears: “Failed to open the device/file or it’s empty.”

And accordingly data from the file is not imported

@Ast_Daniil Can you try to open this file with the column names set in the first row (you need to edit your file)? But when opening the file, don’t change the settings “Names at line”?

Ok, I deleted the first 2 lines in the file (since it contains information about the data, not the data itself). And I tried importing a file with the value “Names at line” equal to 1. The preview of the table correctly identifies and displays it.

Also, if you change the value of “Names at line” to 3 lines, the table will also be displayed correctly in preview. In any case, the message “Failed to open the device/file or it’s empty.” appears and the data is not imported

Can you please active the Debug tracing in the application settings

start the application in the terminal, try to import again and post here the debug output?

It looks like I don’t have the Debug tracing in the application settings

I cannot reproduce this issues and don’t see anything obvious in the code that could explain the behavior you’re observing :frowning: Would it be possible for you to compile labplot from sources in the debug mode? The most simplest setup with no optional dependencies would be enough.

I am using LabPlot2 2.11.1, a remote Flathup installed on the Linux Mint 21.3 Cinnamon operating system using Software Manager.
Unfortunately, I do not know how to compile labplot from sources in the debug mode, as I am not a programmer. If you can tell me how I can do this, then I will be happy to go to a meeting to solve this problem.

I don’t have any experience with Mint, but it’s based on Ubuntu’s packages, so in principle you should be able to install the development version by using these commands:

  1. Uninstall the flatpak version first.

  2. Add a new LabPlot repository (Ubuntu’s ppa):
    sudo add-apt-repository ppa:rikmills/experimental
    sudo apt update

  3. Install LabPlot:
    sudo apt install labplot

Can you try it?

More about the ppa:

Thank you very much :slightly_smiling_face:. I did everything according to the instructions and installed the development version. Then I tried to import the file and it was imported without any problems.
Perhaps the problem may be in the flatpak version

That’s great :slight_smile: Thank you for reporting this problem. Yes, we need to check the flatpak version.

Hello, I am running into the same issue for importing txt files. I also installed Labplot with flatpak from the software manager on linux mint 22, so it might not be an isolated issue.

1 Like

@Ast_Daniil We are able to reproduce the problem. We will have a look into it. Thanks for reporting

1 Like

The problem is fixed now in the development version. You can use the nightly flatpak to check it.