biolab / orange3

🍊 :bar_chart: :bulb: Orange: Interactive data analysis
https://orangedatamining.com
Other
4.89k stars 1.02k forks source link

Save Data widget - can not same Excel files when unknows are present #6527

Closed pereP558 closed 11 months ago

pereP558 commented 1 year ago

When I use the SAVE DATA widget, this does not respond, it doesn't save anything and doesn't export any spreadsheet or any format that it's supposed to be generated by using this widget. I have removed the program and re-installed it, also I have tried to use the widget in other terminals. Didn't work. ORANGE VERSION 3.35

janezd commented 1 year ago

Thanks for the report. Unfortunately it is insufficient; we cannot reproduce the problem. What does your workflow look like?

Could you try with just two widgets? Take the File widget, connect it to Save Data, load the Iris data set (in File) and try saving it. What happens?

pereP558 commented 1 year ago

imagen Thanks, Janezd, above you'll find my workflow. When I did it with two widgets it worked. I could save the data in a spreadsheet. Nevertheless, when I attempt to run the above workflow, it doesn't work.

janezd commented 1 year ago

Huh, this is too huge. If the data in FINAL PREDICTIONS looks OK, I don't see how it would mess with Save Data.

Could you try connecting Save Data directly to Select Columns, without having Data Table (FINAL PREDICTIONS) in between?

pereP558 commented 1 year ago

I don't see it either. As you requested, directly applied the SAVE DATA widget to Select Columns. It didn't work, no file was generated. imagen Additionally, I already tried to save that table at the very beginning of the workflow, didn't work. (Upper left side of the previous image).

janezd commented 1 year ago

Additionally, I already tried to save that table at the very beginning of the workflow, didn't work. (Upper left side of the previous image).

You mean, you connected Save to File at the top left? If so, can you share this data? Or at least tell us whether there's anything peculiar in it?

Otherwise, can you save the data from Main Table?

Can you construct a minimal workflow with this problem? Just File -> Gradient Boosting -> Predictions -> Save and another File -> Predictions?

What happens if you connect File -> Predictions instead of Main Table -> Prediction?

pereP558 commented 1 year ago

-"You mean, you connected Save to File at the top left? If so, can you share this data? Or at least tell us whether there's anything peculiar in it?" Yep, I meant I connected FILE-->DATA TABLE-->SAVE DATA. Didn't work either (Image below). I'd love to share this data. Sadly it is kind of confidential due to corporate secrecy. Anyway, this data is just mainly, samples and their respective chemical data and descriptive data. The file is composed of nearly 341 instances, 59 features and target with 9 values. Definitely, nothing peculiar in it. imagen

-"Otherwise, can you save the data from Main Table?" I think this question is answered above.

-"Can you construct a minimal workflow with this problem? Just File -> Gradient Boosting -> Predictions -> Save and another File -> Predictions?" Necessarily, I have to use these two sets of data (training and prediction data) to have an output from the prediction model. However, I followed your instructions to re-arrange the workflow. It didn't generate any output file imagen

-"What happens if you connect File -> Predictions instead of Main Table -> Prediction?" I think this is what you meant. It didn't generate any output file. imagen

janezd commented 1 year ago

Can you try this with a different data set, say one that comes with Orange? So that we see whether it's related to data set or your setup?

When you say it doesn't export anything in any format, I assume it opens the file dialog, you specify the directory and the name, but file is not written? Could there be anything related to your file? Any non-ASCII characters anywhere in the path name, like /Users/mó/data. (Orange should handle this, but one never knows.)

pereP558 commented 1 year ago

I tried using the IRIS data set in a simplified workflow, nevertheless, with the same aim and the same prediction model. The "Save data" widget worked and generated a CSV. I tried to mimic the original workflow in a simplified way, but this time with my data (the former one. The same that I was usising in the above workflow) and It worked. Finally, I could generate a CSV file. imagen

My question is: Why isn't the initial workflow working? Is it due it has a lot of widgets? because when I reduced the length, it worked. These are my first steps in Orange, therefore I'll be grateful for any feedback you can deliver Janezd.

imagen

janezd commented 1 year ago

The number of widgets should have no effect on saving. Based on what I see, it is impossible to tell why it didn't work. If the Table widget can show the data, the Save Table should be able to save it.

C-Denninger commented 1 year ago

Hello,

I'm new here and have kind of the same issue. The strange thing is if I save the data as .CSV a file is created. When I save as an .XLSX no file is created? I added a primary Save Data (test) to one of the input files and that one does save .XLSX as .CSV files.

Anyone an idea what I'm doing wrong or is this a bug? afbeelding

I'm using the latest version 3.36.1 on a Windows 10 pc.

Thanx!

Hubo_winkels_NL.xlsx postcode_geo_locatie.xlsx

PS. how do I upload the Orange .OWS file?

C-Denninger commented 1 year ago

PS. how do I upload the Orange .OWS file?

Ah .ZIP is supported ;) 13 widgets uit Hubo data.zip

C-Denninger commented 1 year ago

I think I found out what is wrong. Apparently it is impossible to write data to Excel if not all data is available (nan in the Data Table) where writing to text (CSV) doesn't have a problem with that. 13 widgets uit Hubo data, postcode=nummer Data Table weergave_org

So the solution (in my case) is to filter all missing data out (using Select Columns) or make the missing data available in some other way. Hubo data 11) Data Table (centroids), postcode=nr

Problem solved, the Save Data to Excel works fine now!

janezd commented 11 months ago

@C-Denninger, thank you, this is it! A proper fix is on the way.