JanDeDobbeleer / oh-my-posh

The most customisable and low-latency cross platform/shell prompt renderer
https://ohmyposh.dev
MIT License
17.01k stars 2.37k forks source link

Prompt is showing "cannot get version" for Python part of the prompt #2871

Closed Heleboel closed 2 years ago

Heleboel commented 2 years ago

Code of Conduct

What happened?

The prompt is showing "cannot get version" in the python part of the prompt. As far as I can see, Python is not installed on my system, however, there are some tools that use Python and might have it installed along their other files.

Theme

{ "$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json", "blocks": [ { "alignment": "left", "segments": [ { "background": "#61AFEF", "foreground": "#ffffff", "leading_diamond": "\ue0b6", "style": "diamond", "template": " {{ if .SSHSession }}\uf817 {{ end }}{{ .UserName }}@{{ .HostName }} ", "trailing_diamond": "\ue0b0", "type": "session" }, { "background": "#C678DD", "foreground": "#ffffff", "powerline_symbol": "\ue0b0", "properties": { "style": "full" }, "style": "powerline", "template": " {{ .Path }} ", "type": "path" }, { "type": "git", "style": "powerline", "powerline_symbol": "\ue0b0", "background": "#95ffa4", "foreground": "#193549", "properties": { "fetch_status": true, "fetch_upstream_icon": true, "template": "[{{ .UpstreamIcon }} {{ .HEAD }}]({{ .UpstreamURL }}){{ .BranchStatus }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \uf692 {{ .StashCount }}{{ end }}{{ if gt .WorktreeCount 0}} \uf1bb {{ .WorktreeCount }}{{ end }} " } }, { "background": "#FF6471", "foreground": "#ffffff", "style": "diamond", "template": "\ue0b0 </>{{ if .Error }}{{ .Error }}{{ else }}{{ if .Venv }}{{ .Venv }} {{ end }}{{ .Full }}{{ end }} ", "trailing_diamond": "\ue0b4", "type": "python" } ], "type": "prompt" }, { "alignment": "right", "segments": [ { "foreground": "#ffffff", "style": "plain", "template": "[{{ .CurrentDate | date .Format }}]", "type": "time" } ], "type": "prompt" }, { "alignment": "left", "newline": true, "segments": [ { "foreground": "#007ACC", "style": "plain", "template": "\u276f", "type": "text" } ], "type": "prompt" } ], "final_space": true, "version": 2 }

What OS are you seeing the problem on?

Windows

Which shell are you using?

powershell

Log output

Version: 11.3.1

Segments:

ConsoleTitle(false) -   0 ms - 
session(true)  -   3 ms - ¯é BoelFG@RB915316 ¯é░
path(true)     -   0 ms - ¯é░ ~ 
git(false)     - 113 ms - 
python(true)   - 678 ms - ¯é░¯é░ cannot get version ¯é┤
time(true)     -   1 ms - [09:10:18]
text(true)     -   0 ms - ÔØ»

Run duration: 866.6305ms

Cache path: C:\Users\Heleboel\AppData\Local\oh-my-posh

Config path: C:\Users\Heleboel\.poshthemes\frits.omp.json

Logs:

2022/10/04 09:10:17 debug: Getenv
C:\Users\Heleboel\AppData\Local
2022/10/04 09:10:17 Getenv duration: 0s, args: LOCALAPPDATA
2022/10/04 09:10:17 CachePath duration: 0s, args: 
2022/10/04 09:10:17 debug: Getenv
C:\Users\Heleboel\.poshthemes\frits.omp.json
2022/10/04 09:10:17 Getenv duration: 0s, args: POSH_THEME
2022/10/04 09:10:17 debug: Shell
process name: powershell.exe
2022/10/04 09:10:17 Shell duration: 58.0369ms, args: 
2022/10/04 09:10:17 resolveConfigPath duration: 58.0369ms, args: 
2022/10/04 09:10:17 Init duration: 60.054ms, args: 
2022/10/04 09:10:17 Flags duration: 0s, args: 
2022/10/04 09:10:17 config.loadConfig duration: 8.014ms, args: 
2022/10/04 09:10:17 Flags duration: 0s, args: 
2022/10/04 09:10:17 debug: Getenv

2022/10/04 09:10:17 Getenv duration: 0s, args: OMP_CACHE_DISABLED
2022/10/04 09:10:17 WindowsRegistryKeyValue duration: 0s, args: HKEY_CURRENT_USER\Software\Microsoft\Windows\DWM\ColorizationColor
2022/10/04 09:10:17 GOOS duration: 0s, args: 
2022/10/04 09:10:17 GOOS duration: 0s, args: 
2022/10/04 09:10:17 GOOS duration: 0s, args: 
2022/10/04 09:10:17 GOOS duration: 0s, args: 
2022/10/04 09:10:17 GOOS duration: 0s, args: 
2022/10/04 09:10:17 GOOS duration: 0s, args: 
2022/10/04 09:10:17 GOOS duration: 0s, args: 
2022/10/04 09:10:17 GOOS duration: 0s, args: 
2022/10/04 09:10:17 GOOS duration: 0s, args: 
2022/10/04 09:10:17 GOOS duration: 0s, args: 
2022/10/04 09:10:17 GOOS duration: 0s, args: 
2022/10/04 09:10:17 GOOS duration: 0s, args: 
2022/10/04 09:10:17 GOOS duration: 0s, args: 
2022/10/04 09:10:17 GOOS duration: 0s, args: 
2022/10/04 09:10:17 GOOS duration: 0s, args: 
2022/10/04 09:10:17 GOOS duration: 0s, args: 
2022/10/04 09:10:17 GOOS duration: 0s, args: 
2022/10/04 09:10:17 GOOS duration: 0s, args: 
2022/10/04 09:10:17 GOOS duration: 0s, args: 
2022/10/04 09:10:17 debug: WindowsRegistryKeyValue
ColorizationColor(DWORD): 0xC44C4A48
2022/10/04 09:10:17 Root duration: 0s, args: 
2022/10/04 09:10:17 Shell duration: 0s, args: 
2022/10/04 09:10:17 ErrorCode duration: 0s, args: 
2022/10/04 09:10:17 IsWsl duration: 0s, args: 
2022/10/04 09:10:17 GOOS duration: 0s, args: 
2022/10/04 09:10:17 debug: Pwd
C:\Users\Heleboel
2022/10/04 09:10:17 Pwd duration: 0s, args: 
2022/10/04 09:10:17 debug: Home
C:\Users\Heleboel
2022/10/04 09:10:17 GOOS duration: 0s, args: 
2022/10/04 09:10:17 GOOS duration: 0s, args: 
2022/10/04 09:10:17 GOOS duration: 0s, args: 
2022/10/04 09:10:17 GOOS duration: 0s, args: 
2022/10/04 09:10:17 GOOS duration: 0s, args: 
2022/10/04 09:10:17 GOOS duration: 0s, args: 
2022/10/04 09:10:17 GOOS duration: 0s, args: 
2022/10/04 09:10:17 GOOS duration: 0s, args: 
2022/10/04 09:10:17 GOOS duration: 0s, args: 
2022/10/04 09:10:17 GOOS duration: 0s, args: 
2022/10/04 09:10:17 GOOS duration: 0s, args: 
2022/10/04 09:10:17 GOOS duration: 0s, args: 
2022/10/04 09:10:17 GOOS duration: 0s, args: 
2022/10/04 09:10:17 GOOS duration: 0s, args: 
2022/10/04 09:10:17 GOOS duration: 0s, args: 
2022/10/04 09:10:17 GOOS duration: 0s, args: 
2022/10/04 09:10:17 GOOS duration: 0s, args: 
2022/10/04 09:10:17 GOOS duration: 0s, args: 
2022/10/04 09:10:17 GOOS duration: 0s, args: 
2022/10/04 09:10:17 debug: User
BoelFG
2022/10/04 09:10:17 User duration: 0s, args: 
2022/10/04 09:10:17 debug: Host
RB915316
2022/10/04 09:10:17 Host duration: 0s, args: 
2022/10/04 09:10:17 GOOS duration: 0s, args: 
2022/10/04 09:10:17 TemplateCache duration: 0s, args: 
2022/10/04 09:10:17 Flags duration: 0s, args: 
2022/10/04 09:10:17 debug: Pwd
C:\Users\Heleboel
2022/10/04 09:10:17 Pwd duration: 999.8┬Ás, args: 
2022/10/04 09:10:17 debug: Home
C:\Users\Heleboel
2022/10/04 09:10:17 GOOS duration: 0s, args: 
2022/10/04 09:10:17 debug: Getenv

2022/10/04 09:10:17 Getenv duration: 0s, args: SSH_CONNECTION
2022/10/04 09:10:17 debug: Getenv

2022/10/04 09:10:17 Getenv duration: 0s, args: SSH_CLIENT
2022/10/04 09:10:17 TemplateCache duration: 0s, args: 
2022/10/04 09:10:17 TemplateCache duration: 0s, args: 
2022/10/04 09:10:17 Shell duration: 0s, args: 
2022/10/04 09:10:17 debug: Pwd
C:\Users\Heleboel
2022/10/04 09:10:17 Pwd duration: 0s, args: 
2022/10/04 09:10:17 debug: Home
C:\Users\Heleboel
2022/10/04 09:10:17 GOOS duration: 0s, args: 
2022/10/04 09:10:17 Shell duration: 0s, args: 
2022/10/04 09:10:17 Shell duration: 0s, args: 
2022/10/04 09:10:17 Flags duration: 0s, args: 
2022/10/04 09:10:17 debug: Pwd
C:\Users\Heleboel
2022/10/04 09:10:17 Pwd duration: 0s, args: 
2022/10/04 09:10:17 debug: Home
C:\Users\Heleboel
2022/10/04 09:10:17 GOOS duration: 0s, args: 
2022/10/04 09:10:17 PathSeparator duration: 0s, args: 
2022/10/04 09:10:17 GOOS duration: 0s, args: 
2022/10/04 09:10:17 GOOS duration: 0s, args: 
2022/10/04 09:10:17 GOOS duration: 0s, args: 
2022/10/04 09:10:17 PathSeparator duration: 0s, args: 
2022/10/04 09:10:17 GOOS duration: 0s, args: 
2022/10/04 09:10:17 PathSeparator duration: 0s, args: 
2022/10/04 09:10:17 GOOS duration: 0s, args: 
2022/10/04 09:10:17 PathSeparator duration: 0s, args: 
2022/10/04 09:10:17 GOOS duration: 0s, args: 
2022/10/04 09:10:17 PathSeparator duration: 0s, args: 
2022/10/04 09:10:17 GOOS duration: 0s, args: 
2022/10/04 09:10:17 IsWsl duration: 0s, args: 
2022/10/04 09:10:17 StackCount duration: 0s, args: 
2022/10/04 09:10:17 DirIsWritable duration: 0s, args: 
2022/10/04 09:10:17 TemplateCache duration: 0s, args: 
2022/10/04 09:10:17 TemplateCache duration: 0s, args: 
2022/10/04 09:10:17 Shell duration: 0s, args: 
2022/10/04 09:10:17 debug: Pwd
C:\Users\Heleboel
2022/10/04 09:10:17 Pwd duration: 0s, args: 
2022/10/04 09:10:17 debug: Home
C:\Users\Heleboel
2022/10/04 09:10:17 GOOS duration: 0s, args: 
2022/10/04 09:10:17 GOOS duration: 0s, args: 
2022/10/04 09:10:17 debug: CommandPath
C:\Program Files\Git\cmd\git.exe
2022/10/04 09:10:17 CommandPath duration: 111.9782ms, args: git.exe
2022/10/04 09:10:17 HasCommand duration: 111.9782ms, args: git.exe
2022/10/04 09:10:17 debug: Pwd
C:\Users\Heleboel
2022/10/04 09:10:17 Pwd duration: 0s, args: 
2022/10/04 09:10:17 error: HasParentFilePath
CreateFile C:\.git: The system cannot find the file specified.
2022/10/04 09:10:17 HasParentFilePath duration: 2.0061ms, args: .git
2022/10/04 09:10:17 debug: Pwd
C:\Users\Heleboel
2022/10/04 09:10:17 Pwd duration: 0s, args: 
2022/10/04 09:10:17 debug: Home
C:\Users\Heleboel
2022/10/04 09:10:17 GOOS duration: 0s, args: 
2022/10/04 09:10:17 debug: Pwd
C:\Users\Heleboel
2022/10/04 09:10:17 Pwd duration: 0s, args: 
2022/10/04 09:10:17 debug: Home
C:\Users\Heleboel
2022/10/04 09:10:17 debug: Getenv

2022/10/04 09:10:17 Getenv duration: 0s, args: VIRTUAL_ENV
2022/10/04 09:10:17 PathSeparator duration: 0s, args: 
2022/10/04 09:10:17 debug: Getenv
C:\Users\Heleboel\AppData\Local
2022/10/04 09:10:17 Getenv duration: 0s, args: LOCALAPPDATA
2022/10/04 09:10:17 PathSeparator duration: 0s, args: 
2022/10/04 09:10:17 debug: HasFilesInDir
false
2022/10/04 09:10:17 HasFilesInDir duration: 592┬Ás, args: python.exe
2022/10/04 09:10:17 error: CommandPath
no Windows Store App
2022/10/04 09:10:17 CommandPath duration: 164.9004ms, args: python
2022/10/04 09:10:17 debug: Getenv
C:\Users\Heleboel\AppData\Local
2022/10/04 09:10:17 Getenv duration: 0s, args: LOCALAPPDATA
2022/10/04 09:10:17 PathSeparator duration: 0s, args: 
2022/10/04 09:10:17 debug: HasFilesInDir
false
2022/10/04 09:10:17 HasFilesInDir duration: 561.7┬Ás, args: python3.exe
2022/10/04 09:10:17 error: CommandPath
no Windows Store App
2022/10/04 09:10:17 CommandPath duration: 162.5116ms, args: python3
2022/10/04 09:10:17 debug: Getenv
C:\Users\Heleboel\AppData\Local
2022/10/04 09:10:17 Getenv duration: 0s, args: LOCALAPPDATA
2022/10/04 09:10:17 PathSeparator duration: 0s, args: 
2022/10/04 09:10:17 debug: HasFilesInDir
false
2022/10/04 09:10:17 HasFilesInDir duration: 1.0267ms, args: python.exe
2022/10/04 09:10:17 error: CommandPath
no Windows Store App
2022/10/04 09:10:17 CommandPath duration: 164.8625ms, args: python
2022/10/04 09:10:17 HasCommand duration: 164.8625ms, args: python
2022/10/04 09:10:18 debug: Getenv
C:\Users\Heleboel\AppData\Local
2022/10/04 09:10:18 Getenv duration: 0s, args: LOCALAPPDATA
2022/10/04 09:10:18 PathSeparator duration: 0s, args: 
2022/10/04 09:10:18 debug: HasFilesInDir
false
2022/10/04 09:10:18 HasFilesInDir duration: 0s, args: python3.exe
2022/10/04 09:10:18 error: CommandPath
no Windows Store App
2022/10/04 09:10:18 CommandPath duration: 185.3067ms, args: python3
2022/10/04 09:10:18 HasCommand duration: 185.3067ms, args: python3
2022/10/04 09:10:18 TemplateCache duration: 0s, args: 
2022/10/04 09:10:18 TemplateCache duration: 0s, args: 
2022/10/04 09:10:18 Shell duration: 0s, args: 
2022/10/04 09:10:18 Flags duration: 0s, args: 
2022/10/04 09:10:18 debug: Pwd
C:\Users\Heleboel
2022/10/04 09:10:18 Pwd duration: 0s, args: 
2022/10/04 09:10:18 debug: Home
C:\Users\Heleboel
2022/10/04 09:10:18 GOOS duration: 0s, args: 
2022/10/04 09:10:18 TemplateCache duration: 0s, args: 
2022/10/04 09:10:18 TemplateCache duration: 0s, args: 
2022/10/04 09:10:18 Shell duration: 0s, args: 
2022/10/04 09:10:18 Flags duration: 0s, args: 
2022/10/04 09:10:18 debug: Pwd
C:\Users\Heleboel
2022/10/04 09:10:18 Pwd duration: 0s, args: 
2022/10/04 09:10:18 debug: Home
C:\Users\Heleboel
2022/10/04 09:10:18 GOOS duration: 0s, args: 
2022/10/04 09:10:18 TemplateCache duration: 0s, args: 
2022/10/04 09:10:18 TemplateCache duration: 0s, args: 
2022/10/04 09:10:18 Shell duration: 0s, args: 
2022/10/04 09:10:18 debug: Getenv
C:\Users\Heleboel\AppData\Local
2022/10/04 09:10:18 Getenv duration: 0s, args: LOCALAPPDATA
2022/10/04 09:10:18 CachePath duration: 0s, args: 
2022/10/04 09:10:18 Flags duration: 0s, args:
JanDeDobbeleer commented 2 years ago

@Heleboel found an issue, will fix.

Heleboel commented 2 years ago

Updating to version 12.0.0 fixed the problem, thanks!

github-actions[bot] commented 9 months ago

This issue has been automatically locked since there has not been any recent activity (i.e. last half year) after it was closed. It helps our maintainers focus on the active issues. If you have found a problem that seems similar, please open a discussion first, complete the body with all the details necessary to reproduce, and mention this issue as reference.