- Debug the code with "dbstopiferror" and locate the line.
- Execute "rehash toolboxcache" and "restoredefaultpath" and check if it still results in error.
- Try creating a new custom system object by inheriting "rl.env.MATLABEnvironment'" and check if calling this also results in the same error.
- Try p-coding your custom class and check if this results in the same error.
- Try executing the command "clear classes" and check if the error goes away.
- If none of the above steps work, reinstall the MATLAB as this issue may have been related to corrupted class hierarchies in MATLAB.
The specified superclass rl.env.MATLABEnvironment' contains a parse error , cannot be found on MATLAB search path , or is shadowed by another file with same name
65 ビュー (過去 30 日間)
古いコメントを表示
Hi,
I am defining custom RL environment as
classdef SmallCellEnv < rl.env.MATLABEnvironment
but it gives error when I run it in MATLAB offline 'The specified superclass rl.env.MATLABEnvironment' contains a parse error , cannot be found on MATLAB search path , or is shadowed by another file with same name, How to resolve this error.
0 件のコメント
回答 (1 件)
Shiva Kalyan Diwakaruni
2021 年 5 月 28 日
編集済み: Shiva Kalyan Diwakaruni
2021 年 5 月 28 日
Hi,
Generally the error "cannot be found on MATLAB's search path, or is shadowed by another file with the same name." is received when there is a user defined function in the MATLAB search path which has the same name as the MATLAB built-in function. In order to resolve the issue follow the troubleshooting steps below:
a) Please, manually go through the MATLAB search path and remove the paths which have functions conflicting with in build MATLAB functions. Execute the following command to get the list of the current search path.
>> path
The following command may help to find the source of the issue:
>> which -all <conflicting_function>
b) If you are unsure of which paths to remove or the above command displays only one line, please restore the MATLAB search path to its factory-installed state by executing the following command :
>> restoredefaultpath
Please, notice that the above command may remove the paths that you have previously added to MATLAB search path in order for your scripts to work. So it is advisable to save a backup copy of the current MATLAB search path before running the command.
Please, refer to the following link to the documentation to backup the current search path:
if the above error still persists please try the below steps
Hope it helps
1 件のコメント
Alexander Greilich
2023 年 6 月 22 日
Thanks, your instructions helps temporary. But after a restart, i got the same error message again.
参考
カテゴリ
Help Center および File Exchange で Debugging and Analysis についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!