Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

conda environment is in all caps in kernel picker #12487

Closed
amunger opened this issue Nov 29, 2022 · 11 comments · Fixed by #12489
Closed

conda environment is in all caps in kernel picker #12487

amunger opened this issue Nov 29, 2022 · 11 comments · Fixed by #12489
Milestone

Comments

@amunger
Copy link
Contributor

amunger commented Nov 29, 2022

Testing #11963

use the MRU kernel picker to create a new python environment
select conda

result: the environment is in caps for some reason, not in python's select kernel list:
image

@DonJayamanne
Copy link
Contributor

DonJayamanne commented Nov 29, 2022

that's weird
@amunger please could you share the logs (the logs would show what we're getting back from python extension)

@DonJayamanne DonJayamanne added the info-needed Issue requires more information from poster label Nov 29, 2022
@amunger
Copy link
Contributor Author

amunger commented Nov 29, 2022

jupyterlogs.txt

@DonJayamanne
Copy link
Contributor

Upstream bug microsoft/vscode-python#20300
#12207

@DonJayamanne DonJayamanne added bug Issue identified by VS Code Team member as probable bug and removed info-needed Issue requires more information from poster labels Nov 30, 2022
@DonJayamanne
Copy link
Contributor

@amunger are you still running into this with the latest python & jujpyter pre-release extensions?

@DonJayamanne DonJayamanne added the info-needed Issue requires more information from poster label Dec 27, 2022
@amunger
Copy link
Contributor Author

amunger commented Jan 3, 2023

yes, some filepaths are still being shown with all caps

@DonJayamanne
Copy link
Contributor

@amunger
Please could you clear your cache in Jupyter as follows:

  • Add the following setting into your user settings files
    "jupyter.development": true,
  • Reload VS Code
  • Wait a few seconds for all kernel finding to complete
  • Use the command Jupyter (Dev): Clear Cache to clear the cache
  • Reload and once you see the env in caps, then please provide all of the jupyter (verbose) logging

@amunger
Copy link
Contributor Author

amunger commented Jan 3, 2023

sure:
jupyterlogs.txt

@DonJayamanne
Copy link
Contributor

Thanks a lot

@DonJayamanne
Copy link
Contributor

Based on the logs we're getting upper case paths from the Python extension.
Here are the logs

debug 12:15:11.800: Python environment for C:\SRC\TEST\6\.CONDA\PYTHON.EXE is C:\SRC\TEST\6\.CONDA\PYTHON.EXE from Python Extension API is {"internal":{"path":"c:\\SRC\\TEST\\6\\.CONDA\\python.exe","id":"C:\\SRC\\TEST\\6\\.CONDA\\PYTHON.EXE","executable":{"uri":{"$mid":1,"fsPath":"c:\\SRC\\TEST\\6\\.CONDA\\python.exe","_sep":1,"path":"/c:/SRC/TEST/6/.CONDA/python.exe","scheme":"file"},"bitness":"64-bit","sysPrefix":"c:\\SRC\\TEST\\6\\.CONDA"},"environment":{"type":"Conda","folderUri":{"$mid":1,"path":"/c:/SRC/TEST/6/.CONDA","scheme":"file"}},"version":{"major":3,"minor":8,"micro":15,"release":{"level":"final","serial":0},"sysVersion":"3.8.15 (default, Nov 24 2022, 14:38:14) [MSC v.1916 64 bit (AMD64)]"},"tools":["Conda"]},"id":"C:\\SRC\\TEST\\6\\.CONDA\\PYTHON.EXE"} and translated is {"id":"C:\\SRC\\TEST\\6\\.CONDA\\PYTHON.EXE","sysPrefix":"c:\\SRC\\TEST\\6\\.CONDA","envPath":{"$mid":1,"path":"/c:/SRC/TEST/6/.CONDA","scheme":"file"},"displayPath":{"$mid":1,"path":"/c:/SRC/TEST/6/.CONDA","scheme":"file"},"envName":"","uri":{"$mid":1,"fsPath":"c:\\SRC\\TEST\\6\\.CONDA\\python.exe","_sep":1,"path":"/c:/SRC/TEST/6/.CONDA/python.exe","scheme":"file"},"displayName":"","envType":"Conda","version":{"major":3,"minor":8,"patch":15,"raw":"3.8.15 (default, Nov 24 2022, 14:38:14) [MSC v.1916 64 bit (AMD64)]"}}

Are you can see the first part of the JSON is exactly what we get from Python exteneions API.
here's the code that logs that

                            const env = await api.environments.resolveEnvironment(item.id);
                            const resolved = this.trackResolvedEnvironment(env, true);
                            traceVerbose(
                                `Python environment for ${item.id} is ${
                                    env?.id
                                } from Python Extension API is ${JSON.stringify(
                                    env
                                )} and translated is ${JSON.stringify(resolved)}`
                            );

@karrtikr /cc

@DonJayamanne DonJayamanne removed their assignment Jan 3, 2023
@DonJayamanne DonJayamanne transferred this issue from microsoft/vscode-jupyter Jan 3, 2023
@github-actions github-actions bot added the triage-needed Issue needs to be triaged label Jan 3, 2023
@DonJayamanne
Copy link
Contributor

Here you can see some paths are upper case and some lower case, clearly incorrect paths returned by Python extension and not translated (nor converted) by Jupyter

debug 12:15:11.800: Python environment for C:\SRC\TEST\6\.CONDA\PYTHON.EXE is C:\SRC\TEST\6\.CONDA\PYTHON.EXE from Python Extension API is {"internal":{"path":"c:\\SRC\\TEST\\6\\.CONDA\\python.exe","id":"C:\\SRC\\TEST\\6\\.CONDA\\PYTHON.EXE","executable":{"uri":{"$mid":1,"fsPath":"c:\\SRC\\TEST\\6\\.CONDA\\python.exe","_sep":1,"path":"/c:/SRC/TEST/6/.CONDA/python.exe","scheme":"file"},"bitness":"64-bit","sysPrefix":"c:\\SRC\\TEST\\6\\.CONDA"},"environment":{"type":"Conda","folderUri":{"$mid":1,"path":"/c:/SRC/TEST/6/.CONDA","scheme":"file"}},"version":{"major":3,"minor":8,"micro":15,"release":{"level":"final","serial":0},"sysVersion":"3.8.15 (default, Nov 24 2022, 14:38:14) [MSC v.1916 64 bit (AMD64)]"},"tools":["Conda"]},"id":"C:\\SRC\\TEST\\6\\.CONDA\\PYTHON.EXE"} and translated is {"id":"C:\\SRC\\TEST\\6\\.CONDA\\PYTHON.EXE","sysPrefix":"c:\\SRC\\TEST\\6\\.CONDA","envPath":{"$mid":1,"path":"/c:/SRC/TEST/6/.CONDA","scheme":"file"},"displayPath":{"$mid":1,"path":"/c:/SRC/TEST/6/.CONDA","scheme":"file"},"envName":"","uri":{"$mid":1,"fsPath":"c:\\SRC\\TEST\\6\\.CONDA\\python.exe","_sep":1,"path":"/c:/SRC/TEST/6/.CONDA/python.exe","scheme":"file"},"displayName":"","envType":"Conda","version":{"major":3,"minor":8,"patch":15,"raw":"3.8.15 (default, Nov 24 2022, 14:38:14) [MSC v.1916 64 bit (AMD64)]"}}
debug 12:15:11.800: Python environment for C:\SRC\TEST\7\.CONDA\PYTHON.EXE is C:\SRC\TEST\7\.CONDA\PYTHON.EXE from Python Extension API is {"internal":{"path":"c:\\SRC\\TEST\\7\\.CONDA\\python.exe","id":"C:\\SRC\\TEST\\7\\.CONDA\\PYTHON.EXE","executable":{"uri":{"$mid":1,"fsPath":"c:\\SRC\\TEST\\7\\.CONDA\\python.exe","_sep":1,"path":"/c:/SRC/TEST/7/.CONDA/python.exe","scheme":"file"},"bitness":"64-bit","sysPrefix":"c:\\SRC\\TEST\\7\\.CONDA"},"environment":{"type":"Conda","folderUri":{"$mid":1,"path":"/c:/SRC/TEST/7/.CONDA","scheme":"file"}},"version":{"major":3,"minor":9,"micro":15,"release":{"level":"final","serial":0},"sysVersion":"3.9.15 | packaged by conda-forge | (main, Nov 22 2022, 08:41:22) [MSC v.1929 64 bit (AMD64)]"},"tools":["Conda"]},"id":"C:\\SRC\\TEST\\7\\.CONDA\\PYTHON.EXE"} and translated is {"id":"C:\\SRC\\TEST\\7\\.CONDA\\PYTHON.EXE","sysPrefix":"c:\\SRC\\TEST\\7\\.CONDA","envPath":{"$mid":1,"path":"/c:/SRC/TEST/7/.CONDA","scheme":"file"},"displayPath":{"$mid":1,"path":"/c:/SRC/TEST/7/.CONDA","scheme":"file"},"envName":"","uri":{"$mid":1,"fsPath":"c:\\SRC\\TEST\\7\\.CONDA\\python.exe","_sep":1,"path":"/c:/SRC/TEST/7/.CONDA/python.exe","scheme":"file"},"displayName":"","envType":"Conda","version":{"major":3,"minor":9,"patch":15,"raw":"3.9.15 | packaged by conda-forge | (main, Nov 22 2022, 08:41:22) [MSC v.1929 64 bit (AMD64)]"}}
debug 12:15:11.800: Python environment for C:\USERS\AAMUNGER\APPDATA\LOCAL\PROGRAMS\PYTHON\PYTHON39\PYTHON.EXE is C:\USERS\AAMUNGER\APPDATA\LOCAL\PROGRAMS\PYTHON\PYTHON39\PYTHON.EXE from Python Extension API is {"internal":{"path":"C:\\Users\\aamunger\\AppData\\Local\\Programs\\Python\\Python39\\python.exe","id":"C:\\USERS\\AAMUNGER\\APPDATA\\LOCAL\\PROGRAMS\\PYTHON\\PYTHON39\\PYTHON.EXE","executable":{"uri":{"$mid":1,"fsPath":"c:\\Users\\aamunger\\AppData\\Local\\Programs\\Python\\Python39\\python.exe","_sep":1,"path":"/C:/Users/aamunger/AppData/Local/Programs/Python/Python39/python.exe","scheme":"file"},"bitness":"64-bit","sysPrefix":"C:\\Users\\aamunger\\AppData\\Local\\Programs\\Python\\Python39"},"version":{"major":3,"minor":9,"micro":10,"release":{"level":"final","serial":0},"sysVersion":"3.9.10 (tags/v3.9.10:f2f3f53, Jan 17 2022, 15:14:21) [MSC v.1929 64 bit (AMD64)]"},"tools":[]},"id":"C:\\USERS\\AAMUNGER\\APPDATA\\LOCAL\\PROGRAMS\\PYTHON\\PYTHON39\\PYTHON.EXE"} and translated is {"id":"C:\\USERS\\AAMUNGER\\APPDATA\\LOCAL\\PROGRAMS\\PYTHON\\PYTHON39\\PYTHON.EXE","sysPrefix":"C:\\Users\\aamunger\\AppData\\Local\\Programs\\Python\\Python39","displayPath":{"$mid":1,"path":"/C:/Users/aamunger/AppData/Local/Programs/Python/Python39/python.exe","scheme":"file"},"envName":"","uri":{"$mid":1,"fsPath":"c:\\Users\\aamunger\\AppData\\Local\\Programs\\Python\\Python39\\python.exe","_sep":1,"path":"/C:/Users/aamunger/AppData/Local/Programs/Python/Python39/python.exe","scheme":"file"},"displayName":"","envType":"Unknown","version":{"major":3,"minor":9,"patch":10,"raw":"3.9.10 (tags/v3.9.10:f2f3f53, Jan 17 2022, 15:14:21) [MSC v.1929 64 bit (AMD64)]"}}
debug 12:15:11.800: Python environment for C:\SRC\TEST\2\.CONDA\PYTHON.EXE is C:\SRC\TEST\2\.CONDA\PYTHON.EXE from Python Extension API is {"internal":{"path":"c:\\src\\test\\2\\.conda\\python.exe","id":"C:\\SRC\\TEST\\2\\.CONDA\\PYTHON.EXE","executable":{"uri":{"$mid":1,"fsPath":"c:\\src\\test\\2\\.conda\\python.exe","_sep":1,"path":"/c:/src/test/2/.conda/python.exe","scheme":"file"},"bitness":"64-bit","sysPrefix":"c:\\src\\test\\2\\.conda"},"environment":{"type":"Conda","folderUri":{"$mid":1,"path":"/c:/src/test/2/.conda","scheme":"file"},"workspaceFolder":{"uri":{"$mid":1,"fsPath":"c:\\src\\test\\2","_sep":1,"external":"file:///c%3A/src/test/2","path":"/c:/src/test/2","scheme":"file"},"name":"2","index":0}},"version":{"major":3,"minor":8,"micro":13,"release":{"level":"final","serial":0},"sysVersion":"3.8.13 (default, Oct 19 2022, 22:38:03) [MSC v.1916 64 bit (AMD64)]"},"tools":["Conda"]},"id":"C:\\SRC\\TEST\\2\\.CONDA\\PYTHON.EXE"} and translated is {"id":"C:\\SRC\\TEST\\2\\.CONDA\\PYTHON.EXE","sysPrefix":"c:\\src\\test\\2\\.conda","envPath":{"$mid":1,"path":"/c:/src/test/2/.conda","scheme":"file"},"displayPath":{"$mid":1,"path":"/c:/src/test/2/.conda","scheme":"file"},"envName":"","uri":{"$mid":1,"fsPath":"c:\\src\\test\\2\\.conda\\python.exe","_sep":1,"path":"/c:/src/test/2/.conda/python.exe","scheme":"file"},"displayName":"","envType":"Conda","version":{"major":3,"minor":8,"patch":13,"raw":"3.8.13 (default, Oct 19 2022, 22:38:03) [MSC v.1916 64 bit (AMD64)]"}}
debug 12:15:11.800: Python environment for C:\SRC\TEST\2\.VENV\SCRIPTS\PYTHON.EXE is C:\SRC\TEST\2\.VENV\SCRIPTS\PYTHON.EXE from Python Extension API is {"internal":{"path":"c:\\src\\test\\2\\.venv\\Scripts\\python.exe","id":"C:\\SRC\\TEST\\2\\.VENV\\SCRIPTS\\PYTHON.EXE","executable":{"uri":{"$mid":1,"fsPath":"c:\\src\\test\\2\\.venv\\Scripts\\python.exe","_sep":1,"path":"/c:/src/test/2/.venv/Scripts/python.exe","scheme":"file"},"bitness":"64-bit","sysPrefix":"c:\\src\\test\\2\\.venv"},"environment":{"type":"VirtualEnvironment","name":".venv","folderUri":{"$mid":1,"path":"/c:/src/test/2/.venv","scheme":"file"},"workspaceFolder":{"uri":{"$mid":1,"fsPath":"c:\\src\\test\\2","_sep":1,"external":"file:///c%3A/src/test/2","path":"/c:/src/test/2","scheme":"file"},"name":"2","index":0}},"version":{"major":3,"minor":9,"micro":13,"release":{"level":"final","serial":0},"sysVersion":"3.9.13 (tags/v3.9.13:6de2ca5, May 17 2022, 16:36:42) [MSC v.1929 64 bit (AMD64)]"},"tools":["Venv"]},"id":"C:\\SRC\\TEST\\2\\.VENV\\SCRIPTS\\PYTHON.EXE"} and translated is {"id":"C:\\SRC\\TEST\\2\\.VENV\\SCRIPTS\\PYTHON.EXE","sysPrefix":"c:\\src\\test\\2\\.venv","envPath":{"$mid":1,"path":"/c:/src/test/2/.venv","scheme":"file"},"displayPath":{"$mid":1,"path":"/c:/src/test/2/.venv","scheme":"file"},"envName":".venv","uri":{"$mid":1,"fsPath":"c:\\src\\test\\2\\.venv\\Scripts\\python.exe","_sep":1,"path":"/c:/src/test/2/.venv/Scripts/python.exe","scheme":"file"},"displayName":".venv","envType":"Venv","version":{"major":3,"minor":9,"patch":13,"raw":"3.9.13 (tags/v3.9.13:6de2ca5, May 17 2022, 16:36:42) [MSC v.1929 64 bit (AMD64)]"}}
debug 12:15:11.800: Python environment for C:\SRC\TEST\2\.INNERVENV\SCRIPTS\PYTHON.EXE is C:\SRC\TEST\2\.INNERVENV\SCRIPTS\PYTHON.EXE from Python Extension API is {"internal":{"path":"c:\\src\\test\\2\\.innervenv\\Scripts\\python.exe","id":"C:\\SRC\\TEST\\2\\.INNERVENV\\SCRIPTS\\PYTHON.EXE","executable":{"uri":{"$mid":1,"fsPath":"c:\\src\\test\\2\\.innervenv\\Scripts\\python.exe","_sep":1,"path":"/c:/src/test/2/.innervenv/Scripts/python.exe","scheme":"file"},"bitness":"64-bit","sysPrefix":"c:\\src\\test\\2\\.innervenv"},"environment":{"type":"VirtualEnvironment","name":".innervenv","folderUri":{"$mid":1,"path":"/c:/src/test/2/.innervenv","scheme":"file"},"workspaceFolder":{"uri":{"$mid":1,"fsPath":"c:\\src\\test\\2","_sep":1,"external":"file:///c%3A/src/test/2","path":"/c:/src/test/2","scheme":"file"},"name":"2","index":0}},"version":{"major":3,"minor":9,"micro":13,"release":{"level":"final","serial":0},"sysVersion":"3.9.13 (tags/v3.9.13:6de2ca5, May 17 2022, 16:36:42) [MSC v.1929 64 bit (AMD64)]"},"tools":["Venv"]},"id":"C:\\SRC\\TEST\\2\\.INNERVENV\\SCRIPTS\\PYTHON.EXE"} and translated is {"id":"C:\\SRC\\TEST\\2\\.INNERVENV\\SCRIPTS\\PYTHON.EXE","sysPrefix":"c:\\src\\test\\2\\.innervenv","envPath":{"$mid":1,"path":"/c:/src/test/2/.innervenv","scheme":"file"},"displayPath":{"$mid":1,"path":"/c:/src/test/2/.innervenv","scheme":"file"},"envName":".innervenv","uri":{"$mid":1,"fsPath":"c:\\src\\test\\2\\.innervenv\\Scripts\\python.exe","_sep":1,"path":"/c:/src/test/2/.innervenv/Scripts/python.exe","scheme":"file"},"displayName":".innervenv","envType":"Venv","version":{"major":3,"minor":9,"patch":13,"raw":"3.9.13 (tags/v3.9.13:6de2ca5, May 17 2022, 16:36:42) [MSC v.1929 64 bit (AMD64)]"}}
debug 12:15:11.800: Python environment for C:\SRC\TEST\2\.VENV2\SCRIPTS\PYTHON.EXE is C:\SRC\TEST\2\.VENV2\SCRIPTS\PYTHON.EXE from Python Extension API is {"internal":{"path":"c:\\src\\test\\2\\.venv2\\Scripts\\python.exe","id":"C:\\SRC\\TEST\\2\\.VENV2\\SCRIPTS\\PYTHON.EXE","executable":{"uri":{"$mid":1,"fsPath":"c:\\src\\test\\2\\.venv2\\Scripts\\python.exe","_sep":1,"path":"/c:/src/test/2/.venv2/Scripts/python.exe","scheme":"file"},"bitness":"64-bit","sysPrefix":"c:\\src\\test\\2\\.venv2"},"environment":{"type":"VirtualEnvironment","name":".venv2","folderUri":{"$mid":1,"path":"/c:/src/test/2/.venv2","scheme":"file"},"workspaceFolder":{"uri":{"$mid":1,"fsPath":"c:\\src\\test\\2","_sep":1,"external":"file:///c%3A/src/test/2","path":"/c:/src/test/2","scheme":"file"},"name":"2","index":0}},"version":{"major":3,"minor":9,"micro":13,"release":{"level":"final","serial":0},"sysVersion":"3.9.13 (tags/v3.9.13:6de2ca5, May 17 2022, 16:36:42) [MSC v.1929 64 bit (AMD64)]"},"tools":["Venv"]},"id":"C:\\SRC\\TEST\\2\\.VENV2\\SCRIPTS\\PYTHON.EXE"} and translated is {"id":"C:\\SRC\\TEST\\2\\.VENV2\\SCRIPTS\\PYTHON.EXE","sysPrefix":"c:\\src\\test\\2\\.venv2","envPath":{"$mid":1,"path":"/c:/src/test/2/.venv2","scheme":"file"},"displayPath":{"$mid":1,"path":"/c:/src/test/2/.venv2","scheme":"file"},"envName":".venv2","uri":{"$mid":1,"fsPath":"c:\\src\\test\\2\\.venv2\\Scripts\\python.exe","_sep":1,"path":"/c:/src/test/2/.venv2/Scripts/python.exe","scheme":"file"},"displayName":".venv2","envType":"Venv","version":{"major":3,"minor":9,"patch":13,"raw":"3.9.13 (tags/v3.9.13:6de2ca5, May 17 2022, 16:36:42) [MSC v.1929 64 bit (AMD64)]"}}

`~

@karthiknadig
Copy link
Member

See solution here: microsoft/vscode-python#20300 (comment)

@karthiknadig karthiknadig removed bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster triage-needed Issue needs to be triaged labels Jan 4, 2023
@karthiknadig karthiknadig transferred this issue from microsoft/vscode-python Jan 4, 2023
@karrtikr karrtikr added this to the January 2023 milestone Jan 6, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants