fail2ban wont start/Python syntax error
Solution 1:
This is a bug in fail2ban which affects Ubuntu 18.04 LTS (and 18.10 but that's EOL already). For unknown reasons the relevant Ubuntu package maintainers have chosen not to fix this bug, even though a patch is available. You can try to patch the code yourself, or post on launchpad asking why it hasn't been fixed, or upgrade to 20.04 LTS.