tasket / wyng-backup

Fast backups for logical volumes & disk images
GNU General Public License v3.0
251 stars 16 forks source link

Specifying custom Zstd level leads to error #135

Closed keeperofdakeys closed 1 year ago

keeperofdakeys commented 1 year ago

Running this program on python 3.9 on Almalinux 9 I'm running into the following error. It's using zstd version 1.5.2.6 from pip.

[root@host wyng-backup]# ~/app/wyng-backup/wyng arch-init --local=vg1/thinpool --dest=internal:/mnt/storage/ --subdir=backups --compression=zstd:7
Wyng 0.3.6 release 20230221
Traceback (most recent call last):
  File "/root/app/wyng-backup/wyng", line 2919, in <module>
    aset             = get_configs()
  File "/root/app/wyng-backup/wyng", line 758, in get_configs
    arch_init(aset)
  File "/root/app/wyng-backup/wyng", line 600, in arch_init
    compressors[compression][2](b"test", compr_level)
  File "/root/app/wyng-backup/wyng", line 2902, in <lambda>
    if zstd:   compressors["zstd"] = (zstd, 3, lambda data, lvl: zstd.compress(data, lvl, 3))
TypeError: an integer is required (got type str)
tasket commented 1 year ago

@keeperofdakeys Are you saying there will be no error if you use the zstd default?

Edit: I see this is the case. Its not related to the zstd library version.

keeperofdakeys commented 1 year ago

Yes no error when I don't specify a level. Then I can manually change the level in the config file, and it will happily use it.

tasket commented 1 year ago

Fixed.