fran-f / keypirinha-terminal-profiles

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

Installed, got error #1

Closed eykamp closed 4 years ago

eykamp commented 4 years ago

Not sure what else to add...

17:32:31.146 Plugin loaded: Terminal-Profiles.TerminalProfiles (instance #1) 17:32:31.228 ** ERROR: Error from Terminal-Profiles.TerminalProfiles.on_catalog: <class 'AttributeError'>: 'list' object has no attribute 'get' Traceback (most recent call last): File "C:\Users\XXX\Desktop\Keypirinha\portable\Profile\InstalledPackages\Terminal-Profiles.keypirinha-package\TerminalProfiles.py", line 39, in on_catalog File "C:\Users\XXX\Desktop\Keypirinha\portable\Profile\InstalledPackages\Terminal-Profiles.keypirinha-package\lib\WindowsTerminalWrapper.py", line 42, in profiles

===== Keypirinha info:

04:28:02.072 Keypirinha 2.24 (06cbb5c) for x64 04:28:02.072 System: WinNT-x64 10.0.18362-ws-0x0100 04:28:02.072 Portable mode 04:28:02.072 Keyboard layout: 00000409 04:28:02.072 Monitor #1: Name[\.\DISPLAY1] Rect[0, 0, 3840, 2160] DpiScale[2.50] PRIMARY 04:28:02.072 Official packages: C:\Users\XXX\Desktop\Keypirinha\default\Packages 04:28:02.072 Profile dir: C:\Users\XXX\Desktop\Keypirinha\portable\Profile 04:28:02.072 Local dir: C:\Users\XXX\Desktop\Keypirinha\portable\Local 04:28:02.102 Python 3.6.7 (default, Nov 14 2018, 21:14:58) [MSC v.1900 64 bit (AMD64)]

fran-f commented 4 years ago

The profile list used to be a simple list, but was recently changed to include profile defaults. Your Windows Terminal configuration seems to use the old format.

I made a change to support both though, can you try with this new release? https://github.com/fran-f/keypirinha-terminal-profiles/releases/tag/v1.1

eykamp commented 4 years ago

I going to say that sort of worked... I see the CMD and Azure terminal options now, with the right icon; the Linux option is there with a Keyprinha icon, and the PowerShell option is not there at all.

https://i.imgur.com/9zUtlA2.png

Luckily for me, CMD and Linux are the two I use most often.

fran-f commented 4 years ago

Getting there! Could you show me your Windows Terminal settings file? I'm interested in the profiles section in particular.

Which Linux distribution have you installed in WSL?

eykamp commented 4 years ago

I've resolved the problems. Powershell profile is now showing up (not sure why), and Linux icon was because the profile didn't define an icon, but instead relied on the default. When I defined an icon, it got picked up as expected.

eykamp commented 4 years ago

Thanks for your help and extension, btw!

fran-f commented 4 years ago

Glad to hear it's working!

Linux icon was because the profile didn't define an icon, but instead relied on the default

If no icon is defined, the plugin will do two one of two things: a. if the profile guid looks like {xxxxxxxx-xxxx-...}, it will try to load the predefined icon with that name; b. otherwise, it will use the Windows Terminal icon.

The only way you would see the "K" icon is case (a), but there's no icon for that guid. If you confirm that was your case for the Linux profile, I can try to add a check to fall back to the Terminal icon instead.

eykamp commented 4 years ago

In my case, the Linux profile did have the proper guid, but K did not load the predefined icon.  However, I had another profile (Azure) that also had no icon defined (but the correct guid), and it got an icon, but a different one than was shown in Terminal. (Incidentally, and with no bearing on this case, I've since figured out to hide this profile -- my settings had about 4 commented out copies as, over time, I tried to get rid of it and it kept being recreated.)

So for my Linux profile, neither a nor b was working, and for the Azure profile, I got "c".  :-)

On 5/25/2020 10:21 AM, Fran wrote:

Glad to hear it's working!

Linux icon was because the profile didn't define an icon, but
instead relied on the default

If no icon is defined, the plugin will do two one of two things: a. if the profile guid looks like |{xxxxxxxx-xxxx-...}|, it will try to load the predefined icon https://github.com/fran-f/keypirinha-terminal-profiles/tree/master/src/resources with that name; b. otherwise, it will use the Windows Terminal icon.

The only way you would see the "K" icon is case (a), but there's no icon for that guid. If you confirm that was your case for the Linux profile, I can try to add a check to fall back to the Terminal icon instead.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/fran-f/keypirinha-terminal-profiles/issues/1#issuecomment-633659399, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIUWC2IKHXY4RZDBGXT52TRTKSLLANCNFSM4NIVLLEQ.