cascadium / wsl-windows-toolbar-launcher

Adds linux GUI application menu to a windows toolbar
MIT License
1.21k stars 50 forks source link

Error when starting wsl-windows-toolbar -> TypeError: not enough arguments for format string #24

Closed vampik33 closed 3 years ago

vampik33 commented 3 years ago

When I try to start wsl-windows-toolbar i have the following error:

Traceback (most recent call last): File "/home/vampik/.local/bin/wsl-windows-toolbar", line 7, in from wsl_windows_toolbar.wsl_windows_toolbar import cli File "/home/vampik/.local/lib/python3.6/site-packages/wsl_windows_toolbar/wsl_windows_toolbar.py", line 26, in uname().system, TypeError: not enough arguments for format string

Also there is no folder: %USERPROFILE%.config\wsl-windows-toolbar-launcher\menus\WSL

fquinner commented 3 years ago

Whoops! Yeah looks like a bug I'll get that fixed soon. In the meantime be sure to run the script from within your WSL environment - that's what that error message was about to tell you until it failed.

vampik33 commented 3 years ago

I run script within WSL environment

fquinner commented 3 years ago

I pushed a change into the main branch there for the format error, but you shouldn't be hitting that issue unless maybe you're running a custom kernel? What does the output from this say:

python3 -c "from platform import uname; print(uname())"

The code looks for "microsoft" in uname().release and "Linux" in uname().system.

panaris commented 3 years ago

I think you need to write Microsoft with capital M

vampik33 commented 3 years ago

I pushed a change into the main branch there for the format error, but you shouldn't be hitting that issue unless maybe you're running a custom kernel? What does the output from this say:

python3 -c "from platform import uname; print(uname())"

The code looks for "microsoft" in uname().release and "Linux" in uname().system.

uname_result(system='Linux', node='DESKTOP-VPV8E5L', release='4.4.0-18362-Microsoft', version='#1049-Microsoft Thu Aug 14 12:01:00 PST 2020', machine='x86_64', processor='x86_64')

fquinner commented 3 years ago

Wow yeah they have changed that its lowercase M on mine will but in a fix for that shortly

fquinner commented 3 years ago

Just pushed in a fix if you can check if has fixed the issue?

pip install --upgrade git+https://github.com/cascadium/wsl-windows-toolbar-launcher.git

If that works I'll push it up to pypi, thanks for reporting!

panaris commented 3 years ago

No, didnt work WSL Linux environment required (detected: Linux [4.4.0-18362-Microsoft])

fquinner commented 3 years ago

That's weird I hacked the versions here locally for testing to contain those strings reported and it worked ok. Are you definitely testing with 0.6.2 (because the formatting fix was pushed in yesterday, but that was still 0.6.1 - the case insensitive fix is in 0.6.2)?

panaris commented 3 years ago

That error is showing when I try to upgrade pip install --upgrade git+https://github.com/cascadium/wsl-windows-toolbar-launcher.git

fquinner commented 3 years ago

Ahhhh it's in setup.py as well... hang on

fquinner commented 3 years ago

OK try again now please... 0.6.3

panaris commented 3 years ago

OK but I think that you should specify that you must not run wsl-windows-toolbar as su

fquinner commented 3 years ago

OK but I think that you should specify that you must not run wsl-windows-toolbar as su

Good call just raised #25 for that one.

fquinner commented 3 years ago

Should be fixed now in 0.6.3