one.alf.exceptions

ALyx File related errors and warnings.

A set of Alyx and ALF related error classes which provide a more verbose description of the raised issues.

Exceptions

ALFError(*args[, terse])

A base class for ALF-related errors.

ALFInvalid(*args[, terse])

ALF path invalid.

ALFMultipleCollectionsFound(*args[, terse])

'Multiple collections found' error

ALFMultipleObjectsFound(*args[, terse])

'Multiple objects found' error

ALFMultipleRevisionsFound(*args[, terse])

'Multiple objects found' error

ALFObjectNotFound(*args[, terse])

'Object not found' error

ALFWarning

Cautions when loading ALF datasets.

AlyxSubjectNotFound(*args[, terse])

'Subject not found' error

exception ALFError(*args, terse=False)[source]

Bases: Exception

A base class for ALF-related errors.

explanation

An optional, verbose but general explanation of the error class. All errors will display the same explanation.

Type:

str

explanation = ''
exception AlyxSubjectNotFound(*args, terse=False)[source]

Bases: ALFError

‘Subject not found’ error

explanation = 'The subject was not found in Alyx database'
exception ALFObjectNotFound(*args, terse=False)[source]

Bases: ALFError

‘Object not found’ error

explanation = 'The ALF object was not found.  This may occur if the object or namespace or incorrectly formatted e.g. the object "_ibl_trials.intervals.npy" would be found with the filters `object="trials", namespace="ibl"`'
exception ALFMultipleObjectsFound(*args, terse=False)[source]

Bases: ALFError

‘Multiple objects found’ error

explanation = 'Dataset files belonging to more than one object found.  ALF names have the pattern (_namespace_)object.attribute(_timescale).extension, e.g. for the file "_ibl_trials.intervals.npy" the object is "trials"'
exception ALFMultipleCollectionsFound(*args, terse=False)[source]

Bases: ALFError

‘Multiple collections found’ error

explanation = 'The matching object/file(s) belong to more than one collection.  ALF names have the pattern collection/(_namespace_)object.attribute(_timescale).extension, e.g. for the file "alf/probe01/spikes.times.npy" the collection is "alf/probe01"'
exception ALFMultipleRevisionsFound(*args, terse=False)[source]

Bases: ALFError

‘Multiple objects found’ error

explanation = 'The matching object/file(s) belong to more than one revision.  Multiple datasets in different revision folders were found with no default specified.'
exception ALFWarning[source]

Bases: Warning

Cautions when loading ALF datasets.

exception ALFInvalid(*args, terse=False)[source]

Bases: ALFError, ValueError

ALF path invalid.

explanation = 'The file path provided is does not match the ALF path specification defined in `one.alf.spec`.'