Fix crash when an import is missing

self.msg is not available when checking the imports.

I had the problem on a host where numpy is missing (python 2.7.3).