Source code for bw_processing.errors

[docs] class BrightwayProcessingError(Exception): pass
[docs] class InconsistentFields(BrightwayProcessingError): """Given fields not the same for each element""" pass
[docs] class NonUnique(BrightwayProcessingError): """Nonunique elements when uniqueness is required""" pass
[docs] class WrongDatatype(BrightwayProcessingError): """Wrong type of data written to a resource""" pass
[docs] class ShapeMismatch(BrightwayProcessingError): """Array shapes in a resource group are not consistent""" pass
[docs] class InvalidName(BrightwayProcessingError): """Name fails datapackage requirements: A short url-usable (and preferably human-readable) name of the package. This MUST be lower-case and contain only alphanumeric characters along with ".", "_" or "-" characters. """ pass
[docs] class FileIntegrityError(BrightwayProcessingError): """MD5 hash does not agree with file contents""" pass
[docs] class Closed(BrightwayProcessingError): """Datapackage closed, can't be written to anymore.""" pass
[docs] class LengthMismatch(BrightwayProcessingError): """Number of resources doesn't match the number of data objects""" pass
[docs] class InvalidMimetype(BrightwayProcessingError): """Provided mimetype missing or not understood""" pass
[docs] class PotentialInconsistency(BrightwayProcessingError): """Given operation could cause inconsistent data""" pass