OK so I think I've got to the bottom of it.
If you:
- purge all deluge packages (i.e. rm -R /var/lib/deluged)
- reinstall all the packages
- then patch the log.py as mentioned previously
It then seems to be in a working state, so I think:
A: The Debian upgrade leaves some incompatible configuration/ssl stuff?
B: Deluge 2.0.3 is broken under python 3.9
It does look like there's a change upstream that's not released yet
which
fixes it judging by the fact this line is different:
https://git.deluge-torrent.org/deluge/tree/deluge/log.py?h=develop#n91
-Rob