That xpra code? Damn, that's Python written by a shell coder by the looks of it, eugh! I can see a few odd bits of indentation I've never seen before, which might cause problems with python3, but I wasn't aware of differences between the two so I can't guess which one it's fouling up on.
Mind you, there are a few other differences between python3 and python2, and since this was written for a flavour of python2, I expect you'll get more success taking that approach. What's the import error you get on python2?