readtable: no Constant property or Static method named 'init'
14 次查看(过去 30 天)
显示 更早的评论
Hi,
I am using matlab 2019b but I expereienced the exact same probelm on 2020b installed on a different machine.
I am trying to use readtable function
logEvent = readtable(filename, opts);
but I get an error message:
Error using matlab.io.ImportOptions/readtable (line 499)
The class table has no Constant property or Static method named 'init'.
the code used to be working fine previously when working with some other files.
I tried to re-install MATLAB but it did not help.
Even when I try to use "import Data" menu I get an error message saying that
The import toll doesn't have access to read the file.
an obviously I do have access (read and write) to a local folder on my computer.
Any idea what may be wrong?
BR
Afshin
1 个评论
Menghuan
2023-1-24
Hi, how did you deal with this error information then. Now I faced the same problem as you. A few days ago, it works perfectly well with the readtable function, but now it report errors:
Error using readtable.
The class table has no Constant property or Static method named 'init'.
I don't have any idea what is going on.
回答(1 个)
Sophia Snipes
2023-5-12
You likely have a script "table.m" somewhere, that took over the MATLAB native one. It may be a legacy version that is not compatible with later releases of MATLAB.
1 个评论
Walter Roberson
2023-5-12
It is more common for the problem to turn out to be that the user has third party software installed that has a function with the same name as one of MATLAB's functions. For example there is a third party toolbox that defines a function named "set" that causes problems and was always doomed to failure as "set" is a very old matlab function... the authors should have known better. There is a different toolbox that defines "height" which is a bit more justified for older software as height() only become a matlab function after table() objects were introduced.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Environment and Settings 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!