Bug 1199080 - Vorta fails to read borg archive and make new snapshot
Summary: Vorta fails to read borg archive and make new snapshot
Status: RESOLVED FIXED
Alias: None
Product: openSUSE Distribution
Classification: openSUSE
Component: Other (show other bugs)
Version: Leap 15.4
Hardware: x86-64 openSUSE Leap 15.4
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Antonio Larrosa
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-05-02 12:09 UTC by Cruiz
Modified: 2022-11-02 14:25 UTC (History)
4 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Cruiz 2022-05-02 12:09:55 UTC
Vorta can be connected to Borg Repo and the backup runs through seemingly normally, but is not completed.

The list of archives is not displayed. Refresh runs dead.

On the command line with borg there are no problems. So the problem is with vorta.
Comment 1 Cruiz 2022-05-07 08:47:38 UTC
Upstream Bugreport: https://github.com/borgbase/vorta/issues/1222
Comment 2 Iakov Karpov 2022-07-17 12:42:14 UTC
It works fine with vorta 0.8.7, but it's not available for Leap 15.4
Comment 3 Frederik Möllers 2022-09-01 23:09:35 UTC
Not sure if this is the same problem, but I just ran vorta on Leap 15.4 and had this output in the console:

2022-09-02 00:53:27,743 - vorta.borg.borg_job - INFO - Running command /usr/bin/borg list --info --log-json --json [my borg repo]
Exception in thread Thread-2:
Traceback (most recent call last):
  File "/usr/lib64/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.6/site-packages/vorta/borg/jobs_manager.py", line 57, in run
    job.run()
  File "/usr/lib/python3.6/site-packages/vorta/borg/borg_job.py", line 298, in run
    self.process_result(result)
  File "/usr/lib/python3.6/site-packages/vorta/borg/list_repo.py", line 52, in process_result
    'time': dt.fromisoformat(archive['time'])
AttributeError: type object 'datetime.datetime' has no attribute 'fromisoformat'

And indeed, datetime.datetime.fromisoformat is new in Python 3.7: https://docs.python.org/3.7/library/datetime.html#datetime.datetime.fromisoformat
Leap 15.4 uses Python 3.6 as the default Python (3) runtime, so this seems to be a dependency/packaging error.

I guess the fix would be to make vorta depend on python39 (the next higher Python version in the main repos) and make sure it is run using *that* version instead of the default python3 alternative? Or, if it is easier and fixes the issue, we could update vorta to 0.8.7. I haven't tried that yet.

Any second opinion on this?
Comment 4 Frederik Möllers 2022-09-22 21:03:55 UTC
A workaround is to install Python 3.9 (Package "python39") and run vorta with this version:

PYTHONPATH=/usr/lib/python3.6/site-packages/ python3.9 /usr/bin/vorta
Comment 5 Iakov Karpov 2022-10-07 04:37:32 UTC
(In reply to Frederik Möllers from comment #4)
> A workaround is to install Python 3.9 (Package "python39") and run vorta
> with this version:
> 
> PYTHONPATH=/usr/lib/python3.6/site-packages/ python3.9 /usr/bin/vorta

This workaround did not work for me. It complains about missing PyQt. I have updated Qt5 from KDE:Qt5 repo
Comment 6 柱发 萨 2022-10-08 17:44:01 UTC
This workaround did not work for me too: 

PYTHONPATH=/usr/lib/python3.6/site-packages/ python3.9 /usr/bin/vorta
Traceback (most recent call last):
  File "/usr/bin/vorta", line 6, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3252, in <module>
    def _initialize_master_working_set():
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3235, in _call_aside
    f(*args, **kwargs)
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3264, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 583, in _build_master
    ws.require(__requires__)
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 900, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 786, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'psutil' distribution was not found and is required by vorta
Comment 7 Antonio Larrosa 2022-10-25 09:46:40 UTC
I submitted https://build.opensuse.org/request/show/1031107 which should fix vorta in Leap/PackageHub to work with python 3.6 . If you find any other incompatibility, please, create a new bug and assign it to me.
Comment 8 Swamp Workflow Management 2022-10-30 14:17:40 UTC
openSUSE-RU-2022:10167-1: An update that has one recommended fix can now be installed.

Category: recommended (moderate)
Bug References: 1199080
CVE References: 
JIRA References: 
Sources used:
openSUSE Backports SLE-15-SP4 (src):    vorta-0.8.3-bp154.2.3.1
Comment 9 Frederik Möllers 2022-11-02 14:25:48 UTC
The fix works perfectly, thank you!