diff --git a/src/caosadvancedtools/table_importer.py b/src/caosadvancedtools/table_importer.py index 04c8ea23b19ee0cc055dc58b69f1b3d6fecd1b55..8665eb30cf7162478472a9d31401732ed6edd87b 100755 --- a/src/caosadvancedtools/table_importer.py +++ b/src/caosadvancedtools/table_importer.py @@ -182,7 +182,7 @@ class XLSImporter(object): """ try: xls_file = pd.io.excel.ExcelFile(filename) - except XLRDError as e: + except (XLRDError, ValueError) as e: logger.warning( "Cannot read \n{}.\nError:{}".format(filename, str(e)), diff --git a/unittests/test_table_importer.py b/unittests/test_table_importer.py index 60ca940b0471eaddf6e8c47b1cacbbfe90d22cac..bb26f5031f2ae781899ddc4354ba4527cf669c83 100644 --- a/unittests/test_table_importer.py +++ b/unittests/test_table_importer.py @@ -164,7 +164,6 @@ class XLSImporterTest(unittest.TestCase): df_new = self.importer.check_unique(df) self.assertEqual(df_new.shape[0], 1) - @pytest.mark.xfail(reason="Wrong Error is raised. See Issue #52") def test_raise(self): tmp = NamedTemporaryFile(delete=False, suffix=".lol") tmp.close()