cascadium / wsl-windows-toolbar-launcher

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

NotImplementedError: Can't perform this operation for unregistered loader type #6

Closed mattcobley closed 4 years ago

mattcobley commented 4 years ago

Hi,

I'm receiving the following error after following the installation instructions and trying to run "wsl-windows-toolbar". Once I'm presented with the default selections and am given the option to hit enter or ctrl+c I go ahead and hit enter and see the following:

2020-05-13 22:27:47,095[INFO]: distribution = Ubuntu
2020-05-13 22:27:47,096[INFO]: user = matt
2020-05-13 22:27:47,096[INFO]: confirm_yes = False
2020-05-13 22:27:47,096[INFO]: menu_file = /etc/xdg/menus/gnome-applications.menu
2020-05-13 22:27:47,096[INFO]: wsl_executable = C:\Windows\System32\wsl.exe
2020-05-13 22:27:47,096[INFO]: target_name = WSL
2020-05-13 22:27:47,097[INFO]: preferred_theme = Adwaita
2020-05-13 22:27:47,097[INFO]: alternative_theme = ('Papirus', 'Humanity', 'elementary-xfce')
2020-05-13 22:27:47,097[INFO]: jinja_template_batch = None
2020-05-13 22:27:47,097[INFO]: jinja_template_shell = None
2020-05-13 22:27:47,098[INFO]: rc_file = /home/matt/.bashrc
2020-05-13 22:27:47,098[INFO]: has_imagemagick = True
2020-05-13 22:27:47,098[INFO]: has_cairosvg = True
2020-05-13 22:27:47,137[INFO]: install_directory = /mnt/c/Users/mattc/.config/wsl-windows-toolbar-launcher/menus/WSL
2020-05-13 22:27:47,138[INFO]: metadata_directory = /mnt/c/Users/mattc/.config/wsl-windows-toolbar-launcher/metadata/WSL
2020-05-13 22:27:47,138[INFO]: For full list of options available, call script again with --help
2020-05-13 22:27:47,139[INFO]: This script will write to the above locations if it can, but giving final chance to chicken out.
Press <enter> to continue or ctrl+c to abort.
Traceback (most recent call last):
  File "/home/matt/.local/bin/wsl-windows-toolbar", line 11, in <module>
    load_entry_point('wsl-windows-toolbar==0.5.1', 'console_scripts', 'wsl-windows-toolbar')()
  File "/home/matt/.local/lib/python3.6/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/home/matt/.local/lib/python3.6/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/home/matt/.local/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/matt/.local/lib/python3.6/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/home/matt/.local/lib/python3.6/site-packages/wsl_windows_toolbar/wsl_windows_toolbar.py", line 250, in cli
    batch_template = env.get_template("wsl-windows-toolbar-template.bat.j2")
  File "/home/matt/.local/lib/python3.6/site-packages/jinja2/environment.py", line 883, in get_template
    return self._load_template(name, self.make_globals(globals))
  File "/home/matt/.local/lib/python3.6/site-packages/jinja2/environment.py", line 857, in _load_template
    template = self.loader.load(self, name, globals)
  File "/home/matt/.local/lib/python3.6/site-packages/jinja2/loaders.py", line 115, in load
    source, filename, uptodate = self.get_source(environment, name)
  File "/home/matt/.local/lib/python3.6/site-packages/jinja2/loaders.py", line 248, in get_source
    if not self.provider.has_resource(p):
  File "/home/matt/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 1406, in has_resource
    return self._has(self._fn(self.module_path, resource_name))
  File "/home/matt/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 1475, in _has
    "Can't perform this operation for unregistered loader type"
NotImplementedError: Can't perform this operation for unregistered loader type

I'm using WSL1 with Ubuntu (18.04) as my distro, and I'm able to open XTerm from inside WSL as per the check in the README.

fquinner commented 4 years ago

Uh oh... sorry about that. Did you install via pypi or git?

fquinner commented 4 years ago

Actually n/m - got a repro here... please hold...

fquinner commented 4 years ago

Can you upgrade and try again now please? Just pushed in a fix with 0.5.2.

mattcobley commented 4 years ago

All working perfectly now, thanks very much! Really love the idea of the project btw!

fquinner commented 4 years ago

Glad to hear it thanks! Yeah I use it literally every day myself so nice to see others get value from it too :)