python errors? #410

Closed
opened 2021-04-11 22:13:25 +00:00 by benibilme · 3 comments

I have a borgmatic script which I have not run more than a month. Today, I run it and encountered following python errors. I am using manjaro, the package manager changed some python setups the last time I updated. Python is greek to me. Could you please provide some insight?

Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 568, in _build_master
    ws.require(__requires__)
  File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 886, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 777, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (ruamel.yaml 0.17.2 (/usr/lib/python3.9/site-packages), Requirement.parse('ruamel.yaml<0.17.0,>0.15.0'), {'borgmatic'})

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/borgmatic", line 33, in <module>
    sys.exit(load_entry_point('borgmatic==1.5.12', 'console_scripts', 'borgmatic')())
  File "/usr/bin/borgmatic", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "/usr/lib/python3.9/importlib/metadata.py", line 77, in load
    module = import_module(match.group('module'))
  File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 790, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/usr/lib/python3.9/site-packages/borgmatic/commands/borgmatic.py", line 10, in <module>
    import pkg_resources
  File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 3243, in <module>
    def _initialize_master_working_set():
  File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 3226, in _call_aside
    f(*args, **kwargs)
  File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 3255, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 570, in _build_master
    return cls._build_from_requirements(__requires__)
  File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 583, in _build_from_requirements
    dists = ws.resolve(reqs, Environment())
  File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 772, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'ruamel.yaml<0.17.0,>0.15.0' distribution was not found and is required by borgmatic
I have a borgmatic script which I have not run more than a month. Today, I run it and encountered following python errors. I am using manjaro, the package manager changed some python setups the last time I updated. Python is greek to me. Could you please provide some insight? ```` Traceback (most recent call last): File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 568, in _build_master ws.require(__requires__) File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 886, in require needed = self.resolve(parse_requirements(requirements)) File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 777, in resolve raise VersionConflict(dist, req).with_context(dependent_req) pkg_resources.ContextualVersionConflict: (ruamel.yaml 0.17.2 (/usr/lib/python3.9/site-packages), Requirement.parse('ruamel.yaml<0.17.0,>0.15.0'), {'borgmatic'}) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/bin/borgmatic", line 33, in <module> sys.exit(load_entry_point('borgmatic==1.5.12', 'console_scripts', 'borgmatic')()) File "/usr/bin/borgmatic", line 25, in importlib_load_entry_point return next(matches).load() File "/usr/lib/python3.9/importlib/metadata.py", line 77, in load module = import_module(match.group('module')) File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1030, in _gcd_import File "<frozen importlib._bootstrap>", line 1007, in _find_and_load File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 680, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 790, in exec_module File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed File "/usr/lib/python3.9/site-packages/borgmatic/commands/borgmatic.py", line 10, in <module> import pkg_resources File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 3243, in <module> def _initialize_master_working_set(): File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 3226, in _call_aside f(*args, **kwargs) File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 3255, in _initialize_master_working_set working_set = WorkingSet._build_master() File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 570, in _build_master return cls._build_from_requirements(__requires__) File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 583, in _build_from_requirements dists = ws.resolve(reqs, Environment()) File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 772, in resolve raise DistributionNotFound(req, requirers) pkg_resources.DistributionNotFound: The 'ruamel.yaml<0.17.0,>0.15.0' distribution was not found and is required by borgmatic ````
Owner

The short answer: Upgrade borgmatic to 1.5.13+!

The slightly longer answer: Upgrade borgmatic! The version of borgmatic you're using doesn't support ruamel.yaml 0.17.x (a Python dependency), but newer versions (1.5.13+) do. Manjaro upgraded the system version of ruamel.yaml out from under borgmatic, which caused the sudden breakage you're experiencing.

Let me know if that does it!

The short answer: Upgrade borgmatic to 1.5.13+! The slightly longer answer: Upgrade borgmatic! The version of borgmatic you're using [doesn't support `ruamel.yaml` 0.17.x](https://projects.torsion.org/witten/borgmatic/issues/404) (a Python dependency), but newer versions (1.5.13+) do. Manjaro upgraded the system version of `ruamel.yaml` out from under borgmatic, which caused the sudden breakage you're experiencing. Let me know if that does it!
witten added the
question / support
label 2021-04-11 22:25:58 +00:00
Author

Thanks for the info. I now either have to wait manjaro to update the package or turn to aur packages or built myself, which I hate. Arch packages already are on the 1.5.13-2. I quess, I will be able to receive them in a month or so.

Thanks for the info. I now either have to wait manjaro to update the package or turn to aur packages or built myself, which I hate. Arch packages already are on the 1.5.13-2. I quess, I will be able to receive them in a month or so.
Owner

Yeah, that is kind of obnoxious! You could install borgmatic directly with pip in the meantime.

Yeah, that is kind of obnoxious! You could install borgmatic directly with pip in the meantime.
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: borgmatic-collective/borgmatic#410
No description provided.