Catch exceptions in this loop; this makes me wonder now how much time it takes to display a warning.  I wonder if we shouldn't be caching results here.  But this fixes #2671 at least.
Merge pull request #2671 from embray/issue-2671

ImportErrors possible within AstropyLogger