Initialising problem with opensuse leap 15.0
aornt opened this issue · 4 comments
system: openSuSE Leap 15.0 - kernel 4.12.14-lp150.12.4-default
the installation had no problems, but starting the script gives the next error:
user@host:~> sudo pypia -i
[sudo] password for root:
Traceback (most recent call last):
File "/usr/bin/pypia", line 11, in
load_entry_point('pypia==0.3.4', 'console_scripts', 'pypia')()
File "/usr/lib/python3.6/site-packages/pypia/pypia.py", line 324, in main
distro = Distro()
File "/usr/lib/python3.6/site-packages/pypia/pypia.py", line 57, in init
self.get_package_info()
File "/usr/lib/python3.6/site-packages/pypia/pypia.py", line 71, in get_package_info
self.required_packages = package_dict['required_packages'][self.distro]
KeyError: 'opensuse-leap'
user@host:~>
Is this because suse leap 15 is not supported ?
Hi @aornt, thanks for opening this issue. I think the error occurs because opensuse-leap
is not listed in the package_info.json
(but opensuse
is). I fixed this (a580da3) by adding opensuse-leap
and related commands to that file. It should work now. I haven't added this update to pypi yet but will do so in the near future. In the meantime if you'd like to test it, you can clone the repo and run it by doing python /path/to/cloned/repo/pypia/pypia.py -i
I'm not that good maneuvering around in github, so I manually edited the file package_info.json in the /usr/lib/python3.6/pypia directory and replaced it with the line that you made here on github.
It works perfect now :)
For a better user experience it would indeed be good that a clarifying exit-message is displayed when a situation like this is encountered.
Tnx for the quick response.
Good point. I'll add an exception handler there.