I'm not sure this it the same bug, but I get the same AttributeError when I run duplicity with expired AWS credentials. I just ran `python setup.py tests` and saw all but one of the `testing/unit/test_diffdir.py` tests fail. I am running from revision 1401. Here is one of the failed tests.
def stn(s, length, encoding, errors):
"""Convert a string to a null-terminated bytes object.
"""
> s = s.encode(encoding, errors)
E AttributeError: 'bytes' object has no attribute 'encode'
```
Not really what to make of this other than to ensure my AWS credentials don't expire before I run my backups.
I'm not sure this it the same bug, but I get the same AttributeError when I run duplicity with expired AWS credentials. I just ran `python setup.py tests` and saw all but one of the `testing/ unit/test_ diffdir. py` tests fail. I am running from revision 1401. Here is one of the failed tests.
``` _______ _______ _______ _______ _______ _______ _______ ____ DDTest.test_diff _______ _______ _______ _______ _______ _______ _______ _______ ____
_______
self = <testing. unit.test_ diffdir. DDTest testMethod= test_diff>
def test_diff(self): Select( Path(u" testfiles/ dir1"))
diffdir. write_block_ iter(diffdir. SigTarBlockIter (sel1.set_ iter()) , output/ dir1.sigtar" )
u"""Test making a diff"""
sel1 = selection.
> u"testfiles/
unit/test_ diffdir. py:113: diffdir. py:747: in write_block_iter diffdir. py:542: in __next__ next(self. input_iter) ) # pylint: disable= assignment- from-no- return diffdir. py:644: in process rblock( path.index, ti) diffdir. py:503: in tarinfo2tarblock tobuf(errors= u'replace' , encoding= globals. fsencoding) Cellar/ python/ 3.7.3/Framework s/Python. framework/ Versions/ 3.7/lib/ python3. 7/tarfile. py:816: in tobuf gnu_header( info, encoding, errors) Cellar/ python/ 3.7.3/Framework s/Python. framework/ Versions/ 3.7/lib/ python3. 7/tarfile. py:847: in create_gnu_header header( info, GNU_FORMAT, encoding, errors) Cellar/ python/ 3.7.3/Framework s/Python. framework/ Versions/ 3.7/lib/ python3. 7/tarfile. py:937: in _create_header info.get( "gname" , ""), 32, encoding, errors),
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../duplicity/
for block in block_iter:
../duplicity/
result = self.process(
../duplicity/
return self.tarinfo2ta
../duplicity/
headers = tarinfo.
/usr/local/
return self.create_
/usr/local/
return buf + self._create_
/usr/local/
stn(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
s = b'', length = 32, encoding = 'utf-8', errors = 'replace'
def stn(s, length, encoding, errors):
"""Convert a string to a null-terminated bytes object.
"""
> s = s.encode(encoding, errors)
E AttributeError: 'bytes' object has no attribute 'encode'
```
Not really what to make of this other than to ensure my AWS credentials don't expire before I run my backups.