pyznap
pyznap copied to clipboard
Pyznap won't run on Ubuntu server 22.04
It is a superb tool, but I cannot get it to run on Ubuntu Server 22.04. I installed it with
pip install pyznap
but when run, I get this:
# /usr/local/bin/pyznap snap
Mar 05 19:55:15 INFO: Starting pyznap...
Traceback (most recent call last):
File "/usr/local/bin/pyznap", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.10/dist-packages/pyznap/main.py", line 170, in main
return _main()
File "/usr/local/lib/python3.10/dist-packages/pyznap/main.py", line 98, in _main
config = read_config(config_path)
File "/usr/local/lib/python3.10/dist-packages/pyznap/utils.py", line 105, in read_config
dic[option] = int(value)
ValueError: invalid literal for int() with base 10: '4 # Keep 4 frequent snapshots
`
Hey. You need to remove the comments from the config file :). It cannot detect them and thus parses the entire line, so also reads the part after #
as value in the config.
Fantastic. Thanks so much!