@@ -544,15 +544,23 @@ def _load_data(self):
544
544
data , categorical , attribute_names = pickle .load (fh )
545
545
except FileNotFoundError :
546
546
raise ValueError (f"Cannot find file for dataset { self .name } at location '{ fpath } '." )
547
- except (EOFError , ModuleNotFoundError , ValueError ) as e :
547
+ except (EOFError , ModuleNotFoundError , ValueError , AttributeError ) as e :
548
548
error_message = e .message if hasattr (e , "message" ) else e .args [0 ]
549
549
hint = ""
550
550
551
551
if isinstance (e , EOFError ):
552
552
readable_error = "Detected a corrupt cache file"
553
- elif isinstance (e , ModuleNotFoundError ):
553
+ elif isinstance (e , ( ModuleNotFoundError , AttributeError ) ):
554
554
readable_error = "Detected likely dependency issues"
555
- hint = "This is most likely due to https://github.com/openml/openml-python/issues/918. " # noqa: 501
555
+ hint = (
556
+ "This can happen if the cache was constructed with a different pandas version "
557
+ "than the one that is used to load the data. See also "
558
+ )
559
+ if isinstance (e , ModuleNotFoundError ):
560
+ hint += "https://github.com/openml/openml-python/issues/918. "
561
+ elif isinstance (e , AttributeError ):
562
+ hint += "https://github.com/openml/openml-python/pull/1121. "
563
+
556
564
elif isinstance (e , ValueError ) and "unsupported pickle protocol" in e .args [0 ]:
557
565
readable_error = "Encountered unsupported pickle protocol"
558
566
else :
0 commit comments