1

On Ubuntu 17.10, the Backups application fails with this error:

Traceback (most recent call last):
  File "/usr/bin/duplicity", line 1546, in <module>
    with_tempdir(main)
  File "/usr/bin/duplicity", line 1540, in with_tempdir
    fn()
  File "/usr/bin/duplicity", line 1391, in main
    do_backup(action)
  File "/usr/bin/duplicity", line 1416, in do_backup
    globals.archive_dir).set_values()
TypeError: __init__() takes exactly 4 arguments (3 given)

I think this might be a Python 2/3 problem, but it appears other users on 17.10 have deja-dup working.

I've tried reinstalling deja-dup and duplicity, same problem.

Duplicity version: 0.7.12-1ubuntu1
Deja-dup version: 36.3-0ubuntu0.1

Edits:

I was suspecting that for some reason Duplicity wasn't passing self to the class, but in the code the offending line is:

col_stats = collections.CollectionsStatus(globals.backend,
globals.archive_dir).set_values()

Meaning that it's probably not a Python version error because it did indeed pass three arguments to the class.

Now in the CollectionsStatus class, the help says:

Help on class CollectionsStatus in module duplicity.collections:

class CollectionsStatus
 |  Hold information about available chains and sets
 |
 |  Methods defined here:
 |
 |  __init__(self, backend, archive_dir, action)
 |      Make new object.  Does not set values

Meaning that it should definitely be passing 4 arguments, including self.

I have a feeling I know what's going wrong. I often use a script to update all of my Python modules, so I bet that class got changed somewhere along the line and the versions of Duplicity (the shell script) and its Python module are mismatched.

  • 2
    Did you install some version of Python manually? – muru Jan 28 '18 at 1:50
  • @muru not that I remember ... aptitude show python python3 says my Python versions are 2.7.14-2ubuntu1 and 3.6.3-0ubuntu2. Maybe I should try to find deja-dup's source and check if it's targeting a specific version of Python that's bugged, since those two are working fine. – imyxh Jan 28 '18 at 5:25
  • 1
    /usr/lib/python2.7/dist-packages/duplicity/collections.py shows CollectionsStatus.__init__ actually takes 3 arguments as expected. – muru Jan 28 '18 at 5:44
  • @muru Ah, I just finished writing up something about that in my edits section. I guess I'll have to downgrade the Python module of Duplicity. – imyxh Jan 28 '18 at 5:49
0

Apparently, I had Duplicity Python module 0.7.14 and the aptitude package 0.7.12. I used sudo pip uninistall duplicity, followed by sudo aptitude reinstall duplicity and the problem's solved.

I guess I shouldn't be updating all of my Python modules at once.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.