virtnbdbackup -V
2.42
When I run virtnbdbackup an error is displayed and the backup is not completed:
# virtnbdbackup -d vm1 -l auto -o /mntPIPPO/vm1-$(date +"%Y-%U")
[2025-12-23 21:09:28] CRITICAL root virtnbdbackup - main [main]: Unknown Exception during backup: _log() got an unexpected keyword argument 'stacklevel'
[2025-12-23 21:09:28] ERROR root virtnbdbackup - main [main]: _log() got an unexpected keyword argument 'stacklevel'
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/libvirtnbdbackup/common.py", line 115, in safeInfo
from tqdm.contrib.logging import ( # pylint: disable=import-outside-toplevel
ModuleNotFoundError: No module named 'tqdm.contrib.logging'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/bin/virtnbdbackup", line 508, in main
size, state = future.result()
File "/usr/lib64/python3.6/concurrent/futures/_base.py", line 425, in result
return self.__get_result()
File "/usr/lib64/python3.6/concurrent/futures/_base.py", line 384, in __get_result
raise self._exception
File "/usr/lib64/python3.6/concurrent/futures/thread.py", line 56, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/lib/python3.6/site-packages/libvirtnbdbackup/backup/disk.py", line 97, in backup
lib.safeInfo("Virtual disk discard option: [%s]", disk.discardOption)
File "/usr/lib/python3.6/site-packages/libvirtnbdbackup/common.py", line 119, in safeInfo
rootlog.info(msg, *args, **kwargs)
File "/usr/lib64/python3.6/logging/__init__.py", line 1308, in info
self._log(INFO, msg, args, **kwargs)
TypeError: _log() got an unexpected keyword argument 'stacklevel'
Expected behavior
The backup be done.
Hypervisor and/or virtual machine information:
- OS: Alma Linux 8.10
- HV type KVM+libvirt, versions which come with Alma 8.10
Workaround:
It seems that on python 3.6 which is available in RHEL 8.10 and it's "cousins", the _log() function does not support the stacklevel keyword. I commented out the line "kwargs.setdefault("stacklevel", 2)" in safeInfo() in libvirtnbdbackup/common.py and the problem is gone, and the backup gets done. It seems that the "offending" line was added with Commit 2998082.
virtnbdbackup -V
2.42
When I run virtnbdbackup an error is displayed and the backup is not completed:
Expected behavior
The backup be done.
Hypervisor and/or virtual machine information:
Workaround:
It seems that on python 3.6 which is available in RHEL 8.10 and it's "cousins", the _log() function does not support the stacklevel keyword. I commented out the line "kwargs.setdefault("stacklevel", 2)" in safeInfo() in libvirtnbdbackup/common.py and the problem is gone, and the backup gets done. It seems that the "offending" line was added with Commit 2998082.