Cannot read csv with readtable (Unrecognized field name "text")
37 ビュー (過去 30 日間)
古いコメントを表示
Hi All,
I'm trying to read some csv data but saw the following error, for which I had absolutely no clue... Could anyone kindly help?
aaa.csv is just a simple dummy dataset I created with excel for the sake of testing.
Error from matlab:
aaa = readtable('G:\My Drive\Project_GDrive\data\aaa.csv');
Error using readtable (line 517)
Unrecognized field name "text".
Many thanks
Min
12 件のコメント
Walter Roberson
2025 年 1 月 21 日
I would suggest
dbstop if caught error
and then run the code. It should stop at the place the error actually occurs. It is quite unlikely that it is stopping at
which readtable
line 517, as that readtable has no-where near 517 lines.
Walter Roberson
2025 年 8 月 12 日
Ah, in R2024a, readtable.m line 517 contains a throw() for an exception that was taken in another function. Tracking the problem is a bit more of a nuisance, but
dbstop if caught error
would help
回答 (2 件)
Sulaymon Eshkabilov
2025 年 1 月 20 日
You mistyped the file name. It is read correctly - see:
D = readtable('aaa.csv');
disp(D)
4 件のコメント
Min
2025 年 1 月 21 日
移動済み: Walter Roberson
2025 年 1 月 21 日
1 件のコメント
Matteo
2025 年 8 月 10 日
Just to support the the comment - I just had the same problem and I also was able to run the code after rebooting. The dbstop if caught error command also stops at the same place, seems to have to do with some settings from matlab.io missing the 'text' entries. Maybe these settings were modified by something else and a fresh restart ensured that they were not affected?
参考
カテゴリ
Help Center および File Exchange で Calendar についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
