WSL (11) ERROR: UtilTranslatePathList:2671: Failed to translate
Version
Microsoft Windows [Version 10.0.22000.1335]
WSL Version
- [X] WSL 2
- [ ] WSL 1
Kernel Version
5.15.79.1-microsoft-standard-WSL2
Distro Version
Release: 20.04
Other Software
Visual Studio Code (1.74.1)
Repro Steps
- PS C:\Users\user> wsl.exe --update
- Open ubuntu terminal
- Get the following output:
<3>WSL (4564) ERROR: UtilTranslatePathList:2671: Failed to translate F:\Users\Eliya\AppData\Local\Programs\Microsoft VS Code\bin
➜ ~
I'm sorry for the poor reproduction steps, it just happened when I ran wsl.exe --update
Expected Behavior
Should not throw an error.
Actual Behavior
Getting <3>WSL (11) ERROR: UtilTranslatePathList:2671: Failed to translate F:\Users\Eliya\AppData\Local\Programs\Microsoft VS Code\bin every time I open a terminal
Diagnostic Logs
Let me know about any information I need to supply.
~Got the same translation error <3>WSL (53) ERROR: UtilTranslatePathList:2671: Failed to translate E:\SomePath\ when trying to open a folder in WSL using VSCode.~
EDIT: Actually the error was because E: did not exist on that machine.
@qdm12 and it seems like F does not exist in my machine as well. Is it hardcoded somewhere?
It's in my PATH environnement variable defined on Windows. Maybe WSL should just ignore non existant path values ?
Thanks for the tip! although it looks like even after I remove that path and restart WSL, the error persists.
Did you close and re-open your shell/terminal? Such that the environment variables get reloaded. Otherwise try a reboot?
@qdm12 Problem solved. Restarting the shell seems to do the trick. Thanks!
Hi, I have the same problem. I tried to restart the shell and reboot but the problem persists
<3>WSL (723) ERROR: UtilTranslatePathList:2671: Failed to translate Z:\home\gianni\dev\gettse
I had <3>WSL (9) ERROR: UtilTranslatePathList:2671: Failed to translate F:\DATI\platform-tools I was fixing it set path | findstr platform-tools inside it find a ... ;F:\DATI\platform-tools; ... so check envinronment variables follow instruction on this link https://docs.oracle.com/en/database/oracle/machine-learning/oml4r/1.5.1/oread/creating-and-modifying-environment-variables-on-windows.html delete the line error or correct it with the correct path in my situation my drive was E:
after correct it i fix that error/warning
cool, just the path environment variable in windows, just delete it in your windows.
My organization adds network drives to Path via HKCU/Volatile Environment, so I'm not able to remove via the environmental variable to fix this issue. Instead, as @protella mentioned in another issue, I removed Windows Subsystem for Linux via "Apps & features", which reverted to the previous version and removed the error.
I have the same issue for a subst drive. I suspect that this might be a way to reproduce the issue; create an entry in
HKLM:SYSTEM\CurrentControlSet\Control\Session Manager\DOS Devices
to subst any path to a new drive name, reboot the device, and launch the WSL prompt.
I had a mystery error where WSL was terminating immediately on startup regardless of wsl.exe flags, and updating to WSL through the Store fixed it, so now I'm stuck needing to fix the UtilTranslatePathList problem.
The error (caused by SMB network drives being added to PATH thru Volatile Environment at login) gets resolved by appending this section to wsl.conf:
[interop]
appendWindowsPath=false
I met the same problem~ The root cause is D: does not exists when you started windows .
How to recur this issue:
- stop PC
- power off the mobile hard disk ( which is D: in my PC)
- restart PC, into windows ( there are some PATH variable in my windows )
- power up the mobile hard disk
- start WSL, I found the error message
solution: make sure all the PATH are available and then restart wsl.
$ wsl --shutdown $ wsl
I had encountered a similar issue, but in my case, I was getting this error for all windows paths such as C:\Windows\System32.
Simply restarting the terminal did not work for me.
Restarting wsl seemed to fix it for me ( run wsl --shutdown in PowerShell and then reopen your wsl terminal )
I had same error, seems due to my work's antivirus software Symantec Endpoint Protection, A workaround was to install Ubuntu WSL from the windows store and run via "ubuntu.exe" in the start menu.
I had a mystery error where WSL was terminating immediately on startup regardless of
wsl.exeflags, and updating to WSL through the Store fixed it, so now I'm stuck needing to fix the UtilTranslatePathList problem.The error (caused by SMB network drives being added to PATH thru Volatile Environment at login) gets resolved by appending this section to
wsl.conf:[interop] appendWindowsPath=false
Thank you very much. This solved the problem for me!
I had a mystery error where WSL was terminating immediately on startup regardless of
wsl.exeflags, and updating to WSL through the Store fixed it, so now I'm stuck needing to fix the UtilTranslatePathList problem.The error (caused by SMB network drives being added to PATH thru Volatile Environment at login) gets resolved by appending this section to
wsl.conf:[interop] appendWindowsPath=false
It works and here is a simple one-line command for adding that to the end of wsl.conf!
echo -e "[interop]\nappendWindowsPath = false" | sudo tee -a /etc/wsl.conf
Remove the environment variable that causing the problem. Check the user variable and system variable paths. Then reopen the terminal.
If you use appendWindowsPath=false then you will lose the ability to call the programs defined in system variable. In my case vscode's code keyword stopped working. So, I reverted that.
Remove the environment variable that causing the problem. Check the user variable and system variable paths. Then reopen the terminal. If you use
appendWindowsPath=falsethen you will lose the ability to call the programs defined in system variable. In my case vscode'scodekeyword stopped working. So, I reverted that.
problem is - I do need a PATH to remote share, mounted as Z, in Windows. While WSL dislikes that.
- The issue arises from the Windows and WSL environment path variables conflicting or the WSL attempting to access unavailable paths.
- A solution is to prevent WSL from appending the Windows PATH to the WSL PATH.
- To implement this solution, you need to edit the
wsl.conffile located in the/etc/directory in your WSL instance. - Add the following lines to the
wsl.conffile:
[interop] appendWindowsPath=false