-
-
Notifications
You must be signed in to change notification settings - Fork 211
Closed
Labels
Good First IssueIssues suitable for people new to contributing to openml-python!Issues suitable for people new to contributing to openml-python!enhancement
Description
Description
The __repr__ print for OpenML objects is called from here. The _get_repr_body_fields function contains formatters for printing each object. However, if for certain reasons, some of the attributes are missing the print fails by throwing an error, while other functions of the API may work as-is. This can be a confusing behaviour for users.
Having checks to catch and handle such errors in _get_repr_body_fields will be useful to have.
Steps/Code to Reproduce
Representative example:
import openml
task = openml.tasks.get_task(146806)
print(task) # failsExpected Results
OpenML Classification Task
==========================
Task Type Description: https://www.openml.org/tt/TaskType.SUPERVISED_CLASSIFICATION
Task ID..............: 146806
Task URL.............: https://www.openml.org/t/146806
Estimation Procedure.: holdout
Target Feature.......: label
# of Classes.........: 2
Cost Matrix..........: Available
Actual Results
TypeError: object of type 'NoneType' has no len()
Versions
OpenML 0.12.1.
Metadata
Metadata
Assignees
Labels
Good First IssueIssues suitable for people new to contributing to openml-python!Issues suitable for people new to contributing to openml-python!enhancement