Are there any updates on this, did anyone get it to work? I just tried with the same issue on opening display for me too.
I'm seeing the same thing in trying to package autokey, but with the error displayed in a graphical window on the X server (and yet it says it doesn't know the protocol). This also uses python-xlib, gtk, etc. Thanks, John