pyznap icon indicating copy to clipboard operation
pyznap copied to clipboard

Pyznap won't run on Ubuntu server 22.04

Open lockheed opened this issue 1 year ago • 2 comments

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
`

lockheed avatar Mar 05 '23 19:03 lockheed

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.

yboetz avatar Mar 05 '23 20:03 yboetz

Fantastic. Thanks so much!

lockheed avatar Mar 05 '23 21:03 lockheed