If you change the extension to a ‘supported’ one it will attempt to parse the file and it produced a similar error he had above.
Perhaps a ‘try - except’ block to more gracefully handle the exception and provide useful feedback would be helpful.