Fix #191 need to check for psycopg2.InternalError too
This fix corrects the problem when used with django-simple-import
https://github.com/burke-software/django-simple-import/issues/37