Restore Failed After Upgrade From 3.1 to 3.2.1

Hi all,
I’m facing an issue with restoring backup file after uprading from 3.1 to 3.2.1
root@HNTC-RAD-OTP:/var/lib/privacyidea/backup# pi-manage backup create -e

         _                    _______  _______

___ () _____ _______ __/ / _ / __/ _ |
/ _ / __/ / |/ / _ `/ / // // // // / _// __ |
/ .
/
/ /
/|
/_,/_/_, ///// ||
/
/ /___/

tar: Removing leading `/’ from member names

root@HNTC-RAD-OTP:/var/lib/privacyidea/backup# pi-manage backup restore privacyidea-backup-20200110-1007.tgz

         _                    _______  _______

___ () _____ _______ __/ / _ / __/ _ |
/ _ / __/ / |/ / _ `/ / // // // // / _// __ |
/ .
/
/ /
/|
/_,/_/_, ///// ||
/
/ /___/

Traceback (most recent call last):
File “/usr/bin/pi-manage”, line 1253, in
manager.run()
File “/opt/privacyidea/lib/python3.5/site-packages/flask_script/init.py”, line 417, in run
result = self.handle(argv[0], argv[1:])
File “/opt/privacyidea/lib/python3.5/site-packages/flask_script/init.py”, line 386, in handle
res = handle(*args, **config)
File “/opt/privacyidea/lib/python3.5/site-packages/flask_script/commands.py”, line 216, in call
return self.run(*args, **kwargs)
File “/usr/bin/pi-manage”, line 351, in restore
for line in std_out.split("\n"):
TypeError: <flask_script.commands.Command object at 0x7f68f99f85f8>: a bytes-like object is required, not ‘str’

My environment: Ubuntu server 16.04, Privacyidea installed via ubuntu package.

Thanks,
Jimmy Trung.

Hi @Jimmy_Trung

welcome to the community.
The ubuntu package of 3.2 is built with Python 3 and it looks like we have a string-byte-bug in the restore functionality with Python 3. Thanks a lot for pointing this out.

I opened and issue for that: https://github.com/privacyidea/privacyidea/issues/1982

regards
Cornelius

1 Like