Skip to content

Commit babe8a6

Browse files
authored
improve error message (#420)
1 parent 5b701bb commit babe8a6

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

openml/datasets/dataset.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,10 @@ def remove_tag(self, tag):
151151
def __eq__(self, other):
152152
if type(other) != OpenMLDataset:
153153
return False
154-
elif self.id == other._id or \
155-
(self.name == other._name and self.version == other._version):
154+
elif (
155+
self.dataset_id == other.dataset_id
156+
or (self.name == other._name and self.version == other._version)
157+
):
156158
return True
157159
else:
158160
return False
@@ -222,7 +224,10 @@ def get_data(self, target=None,
222224
rval = []
223225

224226
if not self._data_features_supported():
225-
raise PyOpenMLError('Dataset not compatible, PyOpenML cannot handle string features')
227+
raise PyOpenMLError(
228+
'Dataset %d not compatible, PyOpenML cannot handle string '
229+
'features' % self.dataset_id
230+
)
226231

227232
path = self.data_pickle_file
228233
if not os.path.exists(path):

0 commit comments

Comments
 (0)