chrisjbillington / desktop-app

OS menu shortcuts, correct taskbar behaviour, and environment activation for Python GUI apps
BSD 2-Clause "Simplified" License
6 stars 5 forks source link

Failure if local site packages doesn't exist #11

Closed chrisjbillington closed 4 years ago

chrisjbillington commented 4 years ago
$ lyse
Traceback (most recent call last):
  File "/home/bilbo/miniconda3/envs/foo/lib/python3.7/site-packages/lyse/__main__.py", line 6, in <module>
    desktop_app.set_process_appid('lyse')
  File "/home/bilbo/miniconda3/envs/foo/lib/python3.7/site-packages/desktop_app/shell.py", line 156, in set_process_appid
    config = _ModuleConfig.instance(module_name)
  File "/home/bilbo/miniconda3/envs/foo/lib/python3.7/site-packages/desktop_app/shell.py", line 40, in instance
    cls._instances[module_name] = cls(module_name)
  File "/home/bilbo/miniconda3/envs/foo/lib/python3.7/site-packages/desktop_app/shell.py", line 74, in __init__
    self.launcher_script_path = self._get_launcher_script_path()
  File "/home/bilbo/miniconda3/envs/foo/lib/python3.7/site-packages/desktop_app/shell.py", line 93, in _get_launcher_script_path
    scripts_dir = get_scripts_dir(self.module_name)
  File "/home/bilbo/miniconda3/envs/foo/lib/python3.7/site-packages/desktop_app/environment.py", line 78, in get_scripts_dir
    install_dir = _get_install_directory(module_name)
  File "/home/bilbo/miniconda3/envs/foo/lib/python3.7/site-packages/desktop_app/environment.py", line 72, in _get_install_directory
    return _reverse_egg_link_lookup(import_path)
  File "/home/bilbo/miniconda3/envs/foo/lib/python3.7/site-packages/desktop_app/environment.py", line 54, in _reverse_egg_link_lookup
    for file in sitedir.iterdir():
  File "/home/bilbo/miniconda3/envs/foo/lib/python3.7/pathlib.py", line 1102, in iterdir
    for name in self._accessor.listdir(self):
FileNotFoundError: [Errno 2] No such file or directory: '/home/bilbo/.local/lib/python3.7/site-packages'