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

14 vues (au cours des 30 derniers jours)
Af
Af le 3 Mai 2021
Commenté : Walter Roberson le 12 Mai 2023
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 commentaire
Menghuan
Menghuan le 24 Jan 2023
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.

Connectez-vous pour commenter.

Réponses (1)

Sophia Snipes
Sophia Snipes le 12 Mai 2023
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 commentaire
Walter Roberson
Walter Roberson le 12 Mai 2023
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.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Environment and Settings dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by