Disclaimer I have a similar thread started but I think it got too big and convoluted
In short this is the problem
import imghdr
import os.path
....
image_type = imghdr.what(os.path.normpath(filename))
fails with
IOError: [Errno 22] invalid mode ('rb') or filename: 'D:\\mysvn\\trunk\\Assets\\models\\character\\char1.jpg\r'
Where the aforementioned file does exist
Help? :D