fix nicer ImportError message on Python 3

Exception.message is not defined on Python 3
Merge pull request #6016 from minrk/fix-nice-not-so-much

fix nicer ImportError message on Python 3