New version of readtable does not load .csv file.

I just upgraded from 2019a to 2021b and I cannot upload a .csv file that used to have no problem loading into Matlab. Readtable or similar end result would be preferred since I have many codes that use readtable. The .csv is an output from elsewhere so modifying it would not be feasible since it would require me to modify too many .csv files for current codes to work.
My current error is :
Error using readtable (line 498)
Invalid default value for property 'eol_' in class 'matlab.io.internal.shared.TextInputs':
Too many output arguments.
Error in Compare_node2DAS_PSD (line 11)
T = readtable('20210501_META_DASnode_enid_B.csv');
T=readtable('20210501_META_DASnode_enid_B.csv');

8 commentaires

When I try that file in R2021b I get
Warning: The DATETIME data was created using format 'MM/dd/uuuu hh:mm:ss aa' but also matched 'dd/MM/uuuu hh:mm:ss aa'.
To avoid ambiguity, supply a datetime format using SETVAROPTS, e.g.
opts = setvaropts(opts,varname,'InputFormat','MM/dd/uuuu hh:mm:ss aa');
> In matlab.io.internal.readers/TextDataReader/read (line 102)
In matlab.io.internal.functions/ReadTableWithImportOptionsText/executeImpl (line 61)
In matlab.io.internal.functions/ReadTableWithImportOptions/executeImpl (line 25)
In matlab.io.internal.functions/ReadTableWithImportOptionsText/execute (line 66)
In matlab.io.internal.functions/ReadTableWithImportOptions/execute (line 45)
In matlab.io.internal.functions/ReadTable/execute (line 46)
In matlab.io.internal.functions/ExecutableFunction/validateAndExecute (line 102)
In readtable (line 495)
Warning: Column headers from the file were modified to make them valid MATLAB identifiers before creating variable names for the table. The original column headers are saved in the
VariableDescriptions property.
Set 'VariableNamingRule' to 'preserve' to use the original column headers as table variable names.
I get the same warnings as Walter when using readtable to load your file in both R2019b that I do in R2021b. However, the file is successfully loaded in both versions.
Raymond Ng
Raymond Ng le 3 Fév 2022
Modifié(e) : Raymond Ng le 9 Fév 2022
hm... I'll try a fresh install again to see if things clear up.
2/9/2021
I tried a fresh install of 2021b (not fixed)
I tried a full uninstall of all Matlab including removing preferences and reinstalling 2021b (not fixed)
I tried a full uninstall of all Matlab, computer restart, install 2021b (not fixed)
i tried a full uninstall of all Matlab, windows update, computer restart, install 2021b, restart (not fixed)
I'm still getting:
Error using readtable (line 498)
Invalid default value for property 'eol_' in class
'matlab.io.internal.shared.TextInputs':
Too many output arguments.
Is there a patch or toolbox somewhere that I'm missing?
Have you added any third-party code to the matlab path? Have you added some of your own directories to the matlab path? Are you doing this test in a directory that has some matlab files, or in a directory that only has data?
The error message implies that that something is unexpectedly coming out empty, but there are enough levels involved in the code that tracking it down would probably not be simple.
Hi Walter,
No, there is not any thrid-party code. I'm attempting to run the same code that worked with readtable prior to updating. Yes, the directory has other matlab files. I am only opening matlab, adding my pathway to the .csv file and attempting to use readtable in the command line.
as an experiment, try resetting the matlab path, and switching to a directory that only has a data file, and trying to read it. The working hypothesis is that something that is on the path is interfering, and the test for that is trying to read a file with a totally default path with no m files.
Hi Walter,
You're correct. I moved the .csv into a new directory. I was able to use readtable! Thank you very much! Now I need to figure out what is interrupting my path.
Cheers!
Raymond Ng
Raymond Ng le 30 Mar 2022
Modifié(e) : Raymond Ng le 30 Mar 2022
The solution of moving to a new directory does not seem to work anymore. As I keep working on the script it will eventually throw up the same error. I'm very perplexed as to what is going on. I tried moving my script around to a new folder or up directory, but the same error keeps showing up. On a fresh new script it does seem to work until the error pops up then it will remain. Is there some hidden file that is appearing that is interrupting my path?

Connectez-vous pour commenter.

Réponses (0)

Catégories

Produits

Version

R2021b

Modifié(e) :

le 30 Mar 2022

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by