MATLAB Answers

Why do I get a warning "Name is nonexistent or not a directory" about the Editor_vxdxq folder?

493 views (last 30 days)
After installing R2020a PreRelease I get following warning in the command window on startup:
Warning: Name is nonexistent or not a directory:
C:\Users\<my username>\AppData\Local\Temp\Editor_vxdxq
Additional notes:
1) Warning does not appear in MATLAB R2019a.
2) Furthermore, when I navigate to "C:\Users\username\AppData\Local\Temp\" I do not see the "Editor_vxdxq"file when MATLAB R2020a is closed (or when 19 is open). This file appears as soon as R2020a is open.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 19 Aug 2020
Edited: MathWorks Support Team on 8 Dec 2020
The warning that you are seeing, as well as the automatic generation of the Editor_vxdxq folder is an expected behavior. Essentially, this folder gets automatically created in the background by the Live Editor in MATLAB. When we open MATLAB R2020a this file gets created, if we call the "savepath" command after this, the folder will be saved to the path but it might not exist in the future when the path is reloaded again (hence you see the warning). That being said, there is no concern with the warning itself as the generation of this folder is handled by MATLAB. We have two options to resolve the warning:
1) Remove the "Editor_vxdxq" folder from the path and save it:
  • Open MATLAB
  • Enter the following command in the MATLAB Command Window:
pathtool
  • Use the Set Path dialog box to remove Editor_vxdxq folder from the path and click "Save"
  • On the MATLAB Command Window, enter
savepath
After this you should not get the warning, and can ignore the generation of this file. Since this folder was meant to be temporary, removing it from the MATLAB path should not result in any unexpected side effects in the current MATLAB session. Should you need to save the search path again in the future, make sure to remove the temporary directory again if it appears before saving.
2) You can manually turn the warning off with the following command:
warning('off', 'MATLAB:mpath:nameNonexistentOrNotADirectory')
 
One thing to note is that we generally recommend against using the "savepath" command (unless advised by the MathWorks staff as part of a troubleshooting step) as it can have some serious consequences if an unintended file gets added to the path. To add additional items to the path, we recommend to instead use the "addpath()" command in the "startup.m" file. For more information, please see the following link:
https://www.mathworks.com/help/matlab/ref/startup.html

  6 Comments

Show 3 older comments
adams13
adams13 on 4 May 2020
For me it looks like a mistake of the live script team during play with "path" variables.
The directory gets created during matlab start and deleted during shutdown. The directory was 'Editor' up to Matlab R2019b and 'Editor_vxdxq' starting from Matlab R2020a.
Starting from R2020a, they add this directory to a "path" (one can see it e.g. with 'pathtool'). If the user uses the path as intended, he (she) changes it and saves it. This way, the added 'Editor_vxdxq' gets saved. If it is on the list on the next startup (before the directory was created), the warning appeared.
The problem is that the developers add something to "path" on each start that should not be there. If the user just opens the path and saves it _without_any_changes_, the behavior changes.
Expected behavior: do not add 'Editor_vxdxq' to the path. It is not needed. When I delete it from the path everything works.
Walter Roberson
Walter Roberson on 7 May 2020
I believe that the path item is required for live editor to be able to process one section at a time. There is no actual internal mechanism for executing starting and ending at particular locations: instead the matlab code for the section is copied to a temporary file and the file run as a script.
Image Analyst
Image Analyst on 6 Jul 2020
Amir, the permanent solution is to put
warning('off', 'MATLAB:mpath:nameNonexistentOrNotADirectory');
into your startup.m file.
>> edit startup.m
Then add that line of code and save it.

Sign in to comment.

More Answers (3)

Mark Qu
Mark Qu on 25 Apr 2020
I just started with MatLab today, a few minutes ago, so maybe this is not correct, but to deal with this problem in Linux I launched MatLab as the root (Administrator in Windows I suppose) user & deleted it from within the MatLab GUI's 'Set Path' menu bar option & saved it, then exited MatLab & restarted it as regular user. The warning went away.

  1 Comment

Image Analyst
Image Analyst on 6 Jul 2020
Mark, yes that is correct. In fact, it's the very same thing the Answer above told you to do. However, root or administrator privilege should not be required.

Sign in to comment.


Nathan Kando
Nathan Kando on 21 Sep 2020
Edited: Nathan Kando on 21 Sep 2020
I got this issue because in startup.m,
I used a combination of the commands:
• mfilename
• addpath
• savepath
for the startup file to add itself to the path permanently.
BUT!
When I was testing startup.m,
I used CTRL+Enter to 'evaluate selection' rather than 'run'.
Evaluate selection runs the code from a temporary location;
thus mfilename provides the temporary path to addpath,
which then gets then saved by savepath,
so during the next session you'll see the warning
about the temp path being in the path listings.

  3 Comments

Image Analyst
Image Analyst on 21 Sep 2020
Seems like you would have got an error about addpath() missing input arguments since it requires a folder name.
Nathan Kando
Nathan Kando on 21 Sep 2020
That's just a list of the commands involved, not the exact code. Mathworks took my inline code formatting and grouped it..

Sign in to comment.


Albert Bing
Albert Bing on 17 Dec 2020
Edited: Albert Bing on 17 Dec 2020
Here is my solution.
In your startup.m file, add several lines as following
paths=path;
editors=regexpi(paths, 'C:[^;]*Editor_[^;]*', 'match');%search C:\Users\<name>\*\Editor_*
for i=1:numel(editors)
rmpath(editors{i});
end
clear;
If you don't have or don't know the startup.m file, just create a startup.m file in C:\Users\<your-name>\Documents\MATLAB.
The idea is to find the Editor_* path, and remove it when MATLAB starts.
The regular expression could be more precise like C:\Users\<your-name>\AppData\Local\Temp\Editor_\w*(?=;)

  0 Comments

Sign in to comment.

Tags

No tags entered yet.

Products

Community Treasure Hunt

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

Start Hunting!