fran-f / keypirinha-terminal-profiles

A plugin to integrate Keypirinha and Windows Terminal
MIT License
18 stars 1 forks source link

Custom WT location results in an error #9

Closed bielej closed 3 years ago

bielej commented 3 years ago

Hi, I'm getting a Python type error like so:

11:36:09.940 ** ERROR: Error from Terminal-Profiles.TerminalProfiles.on_start: <class 'TypeError'>: can only concatenate str (not "NoneType") to str
Traceback (most recent call last):
  File "C:\Users\Bielej\scoop\apps\keypirinha\current\portable\Profile\InstalledPackages\Terminal-Profiles.keypirinha-package\terminal_profiles.py", line 43, in on_start
  File "C:\Users\Bielej\scoop\apps\keypirinha\current\portable\Profile\InstalledPackages\Terminal-Profiles.keypirinha-package\terminal_profiles.py", line 90, in _load_settings
  File "C:\Users\Bielej\scoop\apps\keypirinha\current\portable\Profile\InstalledPackages\Terminal-Profiles.keypirinha-package\terminal_profiles.py", line 211, in terminal_instances
  File "C:\Users\Bielej\scoop\apps\keypirinha\current\portable\Profile\InstalledPackages\Terminal-Profiles.keypirinha-package\terminal_profiles.py", line 258, in _package_exists

My config:

[terminal/custom]
# Instruct Keypirinha to collect profiles from this installation
# * Default: true
enabled = true

# The Windows Terminal executable to run when a catalog item is invoked.
#executable = "${var:KNOWNFOLDER_LOCALAPPDATA}\Microsoft\WindowsApps\wt.exe"
executable = "C:\Users\Bielej\scoop\apps\windows-terminal\current\wt.exe"

# The settings file for Windows Terminal. The plugin will look in this
# file to find terminal profiles.
#settings_file = "${var:KNOWNFOLDER_LOCALAPPDATA}\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\Localstate\settings.json"
settings_file = "C:\Users\Bielej\AppData\Local\Microsoft\Windows Terminal\settings.json"

# The text that will appear before a profile name in Keypirinha
# * Default: "Windows Terminal (<instance>): "
prefix = "Terminal "
fran-f commented 3 years ago

Looks like the code that sets up custom instances is a bit broken, sorry about that! šŸ¤¦

I'll get a fix out this week, in the meanwhile try this workaround: copy one of the app_package = ... lines from the other sections, to the top of the one above. That should avoid the error, but your settings would still overrride the original value and point to the Scoop version.

fran-f commented 3 years ago

This should be fixed in the new release. Let me know if it's still giving you trouble!