Wolfram was unexpected at this time

Following instructions on Lesson 8: Also install Visual Studio Code
After opening the Developer command prompt for VS 2019, it shows "Wolfram was unexpected at this time above like this:

When i type code it gives me an error:

I need help, in the video it worked straight up, but here its not the same.

Could you show what you get for this?

echo %PATH%

C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools> echo %PATH%
C:\WINDOWS;C:\WINDOWS;C:\WINDOWS;C:\Program Files (x86)\Common Files\Intel\Shared Libraries\redist\intel64\compiler;“C:\Users\SAHEED LAWASON\AppData\Local\Programs\Python\Python37-32:C:\Users\SAHEED LAWASON\AppData\Local\Programs\Python\Python37-32;C:\MyPythonScripts”;"C:\Users\SAHEED LAWASON\AppData\Local\Programs\Python\Python37-32\Scripts;C:\Users\SAHEED LAWASON\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Python 3.7;C:\Program Files\MATLAB\R2018a\runtime\win64;C:\Program Files\MATLAB\R2018a\bin;C:\Program Files (x86)\Wolfram Research\WolframScript;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;;C:\Users\SAHEED LAWASON\Documents\Scripts;C:\Users\SAHEED LAWASON\Documents;“C:\Users\SAHEED LAWASON\AppData\Local\Programs\Python\Python37-32;C:\MyPythonScripts”;C:\Users\SAHEED LAWASON\AppData\Local\Microsoft\WindowsApps;;C:\Users\SAHEED LAWASON\AppData\Local\Programs\Microsoft VS Code\bin

Sorry, i had to copy the text, the images don’t show when i upload

C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools> echo %PATH%
C:\WINDOWS;C:\WINDOWS;C:\WINDOWS;C:\Program Files (x86)\Common Files\Intel\Shared Libraries\redist\intel64\compiler;“C:\Users\SAHEED LAWASON\AppData\Local\Programs\Python\Python37-32:C:\Users\SAHEED LAWASON\AppData\Local\Programs\Python\Python37-32;C:\MyPythonScripts”;"C:\Users\SAHEED LAWASON\AppData\Local\Programs\Python\Python37-32\Scripts;C:\Users\SAHEED LAWASON\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Python 3.7;C:\Program Files\MATLAB\R2018a\runtime\win64;C:\Program Files\MATLAB\R2018a\bin;C:\Program Files (x86)\Wolfram Research\WolframScript;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;;C:\Users\SAHEED LAWASON\Documents\Scripts;C:\Users\SAHEED LAWASON\Documents;“C:\Users\SAHEED LAWASON\AppData\Local\Programs\Python\Python37-32;C:\MyPythonScripts”;C:\Users\SAHEED LAWASON\AppData\Local\Microsoft\WindowsApps;;C:\Users\SAHEED LAWASON\AppData\Local\Programs\Microsoft VS Code\bin

You seem to have errors in your path. Semicolons are used as a delimiter so if you separate them into a more readable format you have

C:\WINDOWS;
C:\WINDOWS;
C:\WINDOWS;
C:\Program Files (x86)\Common Files\Intel\Shared Libraries\redist\intel64\compiler;
“C:\Users\SAHEED LAWASON\AppData\Local\Programs\Python\Python37-32:C:\Users\SAHEED LAWASON\AppData\Local\Programs\Python\Python37-32;
C:\MyPythonScripts”;
"C:\Users\SAHEED LAWASON\AppData\Local\Programs\Python\Python37-32\Scripts;
C:\Users\SAHEED LAWASON\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Python 3.7;
C:\Program Files\MATLAB\R2018a\runtime\win64;
C:\Program Files\MATLAB\R2018a\bin;
C:\Program Files (x86)\Wolfram Research\WolframScript;
C:\WINDOWS\system32;
C:\WINDOWS;
C:\WINDOWS\System32\Wbem;
C:\WINDOWS\System32\WindowsPowerShell\v1.0;
C:\WINDOWS\System32\OpenSSH;
;
C:\Users\SAHEED LAWASON\Documents\Scripts;
C:\Users\SAHEED LAWASON\Documents;
“C:\Users\SAHEED LAWASON\AppData\Local\Programs\Python\Python37-32;
C:\MyPythonScripts”;
C:\Users\SAHEED LAWASON\AppData\Local\Microsoft\WindowsApps;
;
C:\Users\SAHEED LAWASON\AppData\Local\Programs\Microsoft VS Code\bin

Note the unmatched quotes

“C:\Users\SAHEED LAWASON\AppData\Local\Programs\Python\Python37-32;
C:\MyPythonScripts”;

and this line

C:\Users\SAHEED LAWASON\AppData\Local\Programs\Python\Python37-32:C:\Users\SAHEED LAWASON\AppData\Local\Programs\Python\Python37-32;

Which is duplicated and missing a semicolon between the two (duplicated) paths.
If you go and edit your path replace it with this

C:\WINDOWS;C:\Program Files (x86)\Common Files\Intel\Shared Libraries\redist\intel64\compiler;C:\Users\SAHEED LAWASON\AppData\Local\Programs\Python\Python37-32;C:\MyPythonScripts;C:\Users\SAHEED LAWASON\AppData\Local\Programs\Python\Python37-32\Scripts;C:\Users\SAHEED LAWASON\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Python 3.7;C:\Program Files\MATLAB\R2018a\runtime\win64;C:\Program Files\MATLAB\R2018a\bin;C:\Program Files (x86)\Wolfram Research\WolframScript;C:\WINDOWS\system32;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;C:\Users\SAHEED LAWASON\Documents\Scripts;C:\Users\SAHEED LAWASON\Documents;C:\Users\SAHEED LAWASON\AppData\Local\Microsoft\WindowsApps;C:\Users\SAHEED LAWASON\AppData\Local\Programs\Microsoft VS Code\bin

All I did was remove "'s and duplicates.

Open the Start Menu and search “environment variables” then select it
2020-04-09 14_15_12-System Properties
Then go to the “Path” variable and edit it.

I replaced the path with the one you gave, but the results are still the same

Besides when i selected path and then edit


It gave me several lines containing different paths, i chose edit text and pasted the modified path you gave.
This is what it looked like after i pasted it:

paint 1
What did i miss?

I just realized that when i run “echo %path%” in developer community for vs 2019 after changing to the new path, it still gives me the same path as previously with the quotes, but when i go to enviroment variables to edit path, i don’t see any quotes

Please may i know what time you’ll be available so I can’t get immediate replies… i haven’t been able to move further with the lessons because of this issue and its taking forever to solve

Sorry I forgot about the splitting of variables. You have edited your User Path (top part of this)

So the error is probably in your System Path (bottom portion)

1 Like

whoa!!! great, this worked, THANK YOU!!!

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.