non-GUI thread can't open new window in PyQt. So as a band aid print the message to stderr in such case. And while at it, fix filename in error message (it was clobbered later while constructing stack trace). QubesOS/qubes-issues#1266