readtable: no Constant property or Static method named 'init'

조회 수: 14 (최근 30일)
Af
Af 2021년 5월 3일
댓글: Walter Roberson 2023년 5월 12일
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
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
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
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 CenterFile Exchange에서 Environment and Settings에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by