Warning: Name is nonexistent or not a directory
522 次查看(过去 30 天)
显示 更早的评论
Every time I start up MATLAB, I receive this message:
Warning: Name is nonexistent or not a directory:
C:\POSTDOC\vlfeat\toolbox\mexw32.
Warning: Name is nonexistent or not a directory:
C:\POSTDOC\vlfeat\toolbox\special.
Warning: Name is nonexistent or not a directory:
C:\POSTDOC\vlfeat\toolbox\sift.
Warning: Name is nonexistent or not a directory:
C:\POSTDOC\vlfeat\toolbox\plotop.
Warning: Name is nonexistent or not a directory:
C:\POSTDOC\vlfeat\toolbox\mser.
Warning: Name is nonexistent or not a directory:
C:\POSTDOC\vlfeat\toolbox\misc.
Warning: Name is nonexistent or not a directory:
C:\POSTDOC\vlfeat\toolbox\kmeans.
Warning: Name is nonexistent or not a directory:
C:\POSTDOC\vlfeat\toolbox\imop.
Warning: Name is nonexistent or not a directory:
C:\POSTDOC\vlfeat\toolbox\geometry.
Warning: Name is nonexistent or not a directory:
C:\POSTDOC\vlfeat\toolbox\aib.
Warning: Name is nonexistent or not a directory:
C:\POSTDOC\vlfeat\toolbox.
Warning: Name is nonexistent or not a directory: xml_toolbox.
Warning: Name is nonexistent or not a directory:
C:\POSTDOC\Hand_Mathias\videoIO.
How do I fix this?
10 个评论
Simon Dawson
2021-4-26
I launched Matlab. I got a whole set of "Warning: Name is nonexistent or not a directory:" messages. I pasted in the restore path and save path commands but it would always immediately crash like in <5 seconds and go away altogether. The only thing left was the error dialog box asking to send a crah report to Mathworks which I duly did maybe half a dozen times. Pressing send or ok on that meant that went away and so I was matlab free in terms of running applications. Restarted the Mac and it had the same pathology. So, pathdef to trash and then it was fine. I now have to add back my custom paths.
Image Analyst
2021-4-27
@Simon Dawson, since you got an official crash report and MATLAB itself shutdown, it was a real crash and the Mathworks should be contacting you by email with some response.
采纳的回答
Image Analyst
2012-7-4
编辑:Image Analyst
2022-12-7
METHOD #1
If there are some folders in the path you'd still like to keep on the path, and just remove the one folder that it is complaining about,
- Go to the "Home" tab of the tool ribbon,
- Click the SetPath icon.
- Then locate the missing folder(s) and highlight them.
- Click Remove, Save, and Close.
You should not see the missing folders listed the next time you start MATLAB. I think this is the preferred method.
-------------------------------------------------------------------------------------------------------------------------------------------------
METHOD #2
If you'd rather do it by fixing the file in an editor window, instead of simply doing it via the toolbar button meant for this, then you can edit pathdef.m
>> edit pathdef.m
Then search for and locate the bad folder, delete that line in the file, and save the file. You should not see the missing folders listed the next time you start MATLAB.
If NEITHER of the above two methods work, then check your startup.m file by typing "edit startup.m" on the command line. See if everything looks fine there (i.e., there are no calls to addpath with non-existent folders). If non-existent folders are added to the path in your startup.m file, remove them.
-------------------------------------------------------------------------------------------------------------------------------------------------
METHOD #3
Finally, as a last resort, you can issue the line
restoredefaultpath
savepath
to get back to initial "right out of the box" conditions just as if you'd reinstalled MATLAB. This will remove any folders that you have added to the search path after you installed MATLAB and get you back to the original default path.
10 个评论
Bryan Mackey
2023-7-19
Thanks. Interesting that the set path window did not contain my defective path; however, the pathdef.m file did. Simple edit and it's fixed.
更多回答(10 个)
Srichakradhar Reddy Nagireddy
2013-11-11
>> edit pathdef.m
- Remove the directories that are causing the error.
- Save the file and restart matlab, you will notice that you no longer have the error.
17 个评论
JRMel
2015-3-5
编辑:JRMel
2015-3-5
I am having a very similar problem. I get the error below every time I start matlab. I no longer have the crp toolbox. However, the problem paths are not listed when I go to File > Set Path or in pathdef.m
restoredefaultpath savepath --> This doesn't fix the problem
Here are the errors:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/173693/image.png)
2 个评论
Image Analyst
2015-3-5
Does that folder exist? Start a new question and attach your startup.m file. You're probably cd'ing to that folder and it's not there.
JRMel
2015-3-7
Oh that actually helped me solve the problem! The startup file had a couple of addpath lines to those non-existing files. Thank you very much!
Vicente
2015-9-11
I have a similar problem. When I first open MATLAB, I see those same warnings, name non existant or not a directory, but I know what's the cause. I have formatted my pc, and somehow Microsoft managed to change my computer User name from what it was previously. Now, I can't run any of my models. Can anyone help me with fixing this problem please?
1 个评论
Walter Roberson
2015-9-11
Vicente, consider making a shortcut or symbolic link for the old directory name to point to your current directory name.
Manoj Shukla
2020-4-1
Hi Team,
Please provide the solution for step by step
I am having a very similar problem. I get the error below every time I start matlab. I no longer have the crp toolbox. However, the problem paths are not listed when I go to File > Set Path or in pathdef.m
restoredefaultpath savepath --> This doesn't fix the problem
Here are the errors: Offline & Online
>> submit()
Warning: Name is nonexistent or not a directory: C:\Users\lenovo\MATLAB Drive\.\lib
> In path (line 109)
In addpath (line 86)
In submit (line 2)
Warning: Name is nonexistent or not a directory: C:\Users\lenovo\MATLAB Drive\.\lib\jsonlab
> In path (line 109)
In addpath (line 86)
In submitWithConfiguration (line 2)
In submit (line 45)
'parts' requires one of the following:
Automated Driving Toolbox
Navigation Toolbox
Robotics System Toolbox
Sensor Fusion and Tracking Toolbox
Error in submitWithConfiguration (line 4)
parts = parts(conf);
Error in submit (line 45)
submitWithConfiguration(conf);
Thanks & Regards,
Manoj Shukla
2 个评论
Image Analyst
2020-4-1
Open the files it tells you to and change any occurrence of "C:\Users\lenovo\MATLAB Drive" to some folder that you actually DO have.
Walter Roberson
2020-4-2
The code for some of the functions for submitWithConfiguration has some lines in which parts is a function, and also has some lines in which parts is a variable. Recent changes in the way MATLAB finds functions and variables say that when you use a single name as a function and a variable in the same routine, that MATLAB is permitted to assume that the name only refers to a variable, and then to complain when the variable does not yet exist at the time that the name was intended to be a function call. You need to edit the code so that uses some other variable name rather than parts
Alp utku iyidilli
2021-1-3
Warning: Name is nonexistent or not a directory: C:\Users\maila\AppData\Local\Temp\Editor_yviar
Is my error when I run Matlab. I can't understand what the problem is. And plus as I was trying to
cd ~/Desktop
mkdir CONN_Demo
To learn functional connectivity on CONN-Toolbox, I had another problem:
"Cannot CD to C:\Users\maila\Documents\~\Desktop (Name is nonexistent or not a directory)."
Could you tell me what I should do as a non-programmer user?
Thank you in advance...
2 个评论
Walter Roberson
2021-1-3
For the first message see
For the other part:
You appear to be going through the tutorial https://andysbrainbook.readthedocs.io/en/latest/FunctionalConnectivity/CONN_ShortCourse/CONN_02_DataDownload.html which is written expecting that the user is using Mac (or possibly Linux). You will need to replace
cd ~/Desktop
with
cd C:\Users\maila\Desktop
In the place it says
movefile('~/Downloads/sub-01_func_sub-01_task-rest_bold.nii.gz', 'sub-01/func')
movefile('~/Downloads/sub-01_anat_sub-01_T1w.nii', 'sub-01/anat')
then instead of ~/Downloads you should give the path to the place you downloaded the .nii.gz and .nii files which might possibly be
movefile('C:\Users\maila\Downloads/sub-01_func_sub-01_task-rest_bold.nii.gz', 'sub-01/func')
movefile('C:\Users\maila/Downloads/sub-01_anat_sub-01_T1w.nii', 'sub-01/anat')
for your particular account -- here the maila refers to your account name which happened to be stated in the error message about C:\Users\maila\Documents\~\Desktop
Maneesa Mustharif TP
2021-6-6
Warning: Function Warning: Name is nonexistent or not a directory: /MATLAB Drive/./lib
> In path (line 109)
In addpath (line 86)
In addpath (line 49)
In submit (line 2)
Warning: Function Warning: Name is nonexistent or not a directory: /MATLAB Drive/./lib/jsonlab
> In path (line 109)
In addpath (line 86)
In addpath (line 49)
In submitWithConfiguration (line 2)
In submit (line 45)
'parts' requires one of the following:
Automated Driving Toolbox
Navigation Toolbox
Robotics System Toolbox
Sensor Fusion and Tracking Toolbox
UAV Toolbox
Error in submitWithConfiguration (line 4)
parts = parts(conf);
Error in submit (line 45)
submitWithConfiguration(conf);
i have this error when i tried to submit my assignment on matlab.
can you find solution for this?
0 个评论
Walter Roberson
2021-6-6
See https://www.mathworks.com/matlabcentral/answers/481388-how-do-i-resolve?s_tid=srchtitle for a technical explanation.
You need to get corrected code from the courseware system; if corrected code is not available, then the responses at the above link describe how to modify the code yourself.
0 个评论
Priya Priya
2021-9-18
Warning: Function Warning: Name is nonexistent or not a directory: /MATLAB Drive/./lib
> In path (line 109)
In addpath (line 86)
In addpath (line 49)
In submit (line 2)
Warning: Function Warning: Name is nonexistent or not a directory: /MATLAB Drive/./lib/jsonlab
> In path (line 109)
In addpath (line 86)
In addpath (line 49)
In submitWithConfiguration (line 2)
In submit (line 45)
1 个评论
Walter Roberson
2021-9-18
Jose Hancco
2023-9-5
I had the same problem. I've just open by console
open startup.m
and delete directories there. Then save the file and that's all.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Search Path 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!