I solved this by installing xvfb which is essentially a /dev/null Xwindow and prefixing the crontab entry with xvfb-run
My crontab entry now reads
0 3 * * * xvfb-run python /opt/flyback/flyback.py --backup