hdmf.validate.errors module

class hdmf.validate.errors.Error(name, reason, location=None)

Bases: object

Parameters:
  • name (str) – the name of the component that is erroneous

  • reason (str) – the reason for the error

  • location (str) – the location of the error

property name
property reason
property location
class hdmf.validate.errors.DtypeError(name, expected, received, location=None)

Bases: Error

Parameters:
  • name (str) – the name of the component that is erroneous

  • expected (dtype or type or str or list) – the expected dtype

  • received (dtype or type or str or list) – the received dtype

  • location (str) – the location of the error

class hdmf.validate.errors.MissingError(name, location=None)

Bases: Error

Parameters:
  • name (str) – the name of the component that is erroneous

  • location (str) – the location of the error

class hdmf.validate.errors.ExpectedArrayError(name, expected, received, location=None)

Bases: Error

Parameters:
  • name (str) – the name of the component that is erroneous

  • expected (tuple or list) – the expected shape

  • received (str) – the received data

  • location (str) – the location of the error

class hdmf.validate.errors.ShapeError(name, expected, received, location=None)

Bases: Error

Parameters:
  • name (str) – the name of the component that is erroneous

  • expected (tuple or list) – the expected shape

  • received (tuple or list) – the received shape

  • location (str) – the location of the error

class hdmf.validate.errors.MissingDataType(name, data_type, location=None, missing_dt_name=None)

Bases: Error

Parameters:
  • name (str) – the name of the component that is erroneous

  • data_type (str) – the missing data type

  • location (str) – the location of the error

  • missing_dt_name (str) – the name of the missing data type

property data_type
class hdmf.validate.errors.IllegalLinkError(name, location=None)

Bases: Error

A validation error for indicating that a link was used where an actual object (i.e. a dataset or a group) must be used

Parameters:
  • name (str) – the name of the component that is erroneous

  • location (str) – the location of the error

class hdmf.validate.errors.IncorrectDataType(name, expected, received, location=None)

Bases: Error

A validation error for indicating that the incorrect data_type (not dtype) was used.

Parameters:
  • name (str) – the name of the component that is erroneous

  • expected (str) – the expected data_type

  • received (str) – the received data_type

  • location (str) – the location of the error

class hdmf.validate.errors.IncorrectQuantityError(name, data_type, expected, received, location=None)

Bases: Error

A validation error indicating that a child group/dataset/link has the incorrect quantity of matching elements

Parameters:
  • name (str) – the name of the component that is erroneous

  • data_type (str) – the data type which has the incorrect quantity

  • expected (str or int) – the expected quantity

  • received (str or int) – the received quantity

  • location (str) – the location of the error