Polished error messages in create_extended_attributes().
@@ -58,17 +58,17 @@ def create_extended_attributes(conn, model_name, layers, data_spec, label_file_n
# ensure list of strings
if not isinstance(layers,list):
- raise TypeError('layers must be a list of strings.')
+ raise TypeError('Parameter layers must be a list of strings.')
else:
if not all(isinstance(x,str) for x in layers):
- raise TypeError('all layers elements must be strings.')
+ raise TypeError('Some elements of the layers list are not strings.')
# ensure list of data specs
if not isinstance(data_spec,list):
- raise TypeError('data_spec must be a list of DataSpec objects.')
+ raise TypeError('Parameter data_spec must be a list of DataSpec objects.')
else:
if not all(isinstance(x,DataSpec) for x in data_spec):
- raise TypeError('all data_spec elements must be DataSpec objects.')
+ raise TypeError('Some elements of the data_spec list are not DataSpec objects.')
# read user-supplied labels
if label_file_name is None:
