Prayag2 / konsave

A command line program written in Python to let you backup your dotfiles and switch to other ones in an instant. Works out-of-the box on KDE Plasma!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Update PyYaml version

ca5ua1 opened this issue · comments

Describe the bug
Fails to run any command

To reproduce
Just install via AUR on arch. Thou maybe need to have installed latest PyYaml before that.

Expected behavior
Be able to run it.

Screenshots

!  ~  konsave -h                                             
/usr/lib/python3.10/site-packages/pkg_resources/__init__.py:116: PkgResourcesDeprecationWarning: git-archive.dev8b63d73a17 is an invalid version and will not be supported in a future release
warnings.warn(
/usr/lib/python3.10/site-packages/pkg_resources/__init__.py:116: PkgResourcesDeprecationWarning: 2.0.5-build-libtorrent-rasterbar-src-libtorrent-rasterbar-2.0.5-bindings-python is an invalid version and will not be supported in a future release
warnings.warn(
Traceback (most recent call last):
File "/usr/lib/python3.10/site-packages/pkg_resources/__init__.py", line 573, in _build_master
ws.require(__requires__)
File "/usr/lib/python3.10/site-packages/pkg_resources/__init__.py", line 891, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/lib/python3.10/site-packages/pkg_resources/__init__.py", line 782, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (PyYAML 6.0 (/usr/lib/python3.10/site-packages), Requirement.parse('PyYaml==5.4.1'), {'Konsave'})

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/bin/konsave", line 33, in <module>
sys.exit(load_entry_point('Konsave==2.1.1', 'console_scripts', 'konsave')())
File "/usr/bin/konsave", line 25, in importlib_load_entry_point
return next(matches).load()
File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 171, in load
module = import_module(match.group('module'))
File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 992, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/usr/lib/python3.10/site-packages/konsave/__init__.py", line 3, in <module>
from pkg_resources import get_distribution, DistributionNotFound
File "/usr/lib/python3.10/site-packages/pkg_resources/__init__.py", line 3266, in <module>
def _initialize_master_working_set():
File "/usr/lib/python3.10/site-packages/pkg_resources/__init__.py", line 3240, in _call_aside
f(*args, **kwargs)
File "/usr/lib/python3.10/site-packages/pkg_resources/__init__.py", line 3278, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/usr/lib/python3.10/site-packages/pkg_resources/__init__.py", line 575, in _build_master
return cls._build_from_requirements(__requires__)
File "/usr/lib/python3.10/site-packages/pkg_resources/__init__.py", line 588, in _build_from_requirements
dists = ws.resolve(reqs, Environment())
File "/usr/lib/python3.10/site-packages/pkg_resources/__init__.py", line 777, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'PyYaml==5.4.1' distribution was not found and is required by Konsave
!  ~  sudo pip install PyYaml                                    MSK
Requirement already satisfied: PyYaml in /usr/lib/python3.10/site-packages (6.0)

System information

Additional context
I might have some problems with Python packages.

I can replicate this on manjaro. Here's a easy fix:

sudo sed -i 's/PyYaml==5.4.1/PyYaml>=5.4.1/g' /usr/lib/python3.10/site-packages/Konsave-2.1.1-py3.10.egg-info/requires.txt

Added PR #56

Thanks @ishaanbhimwal for fixing this. I will merge the pull request soon!