fiftyone.core.media#
Sample media utilities.
Functions:
|
Gets the media type for the given filepath. |
Exceptions:
Exception raised when a problem with media types is encountered. |
|
|
Exception raised when a grouped collection is passed to a method that expects a primitive media type to be selected. |
- fiftyone.core.media.get_media_type(filepath)#
Gets the media type for the given filepath.
- Parameters:
filepath – a filepath
- Returns:
the media type
- exception fiftyone.core.media.MediaTypeError#
Bases:
TypeError
Exception raised when a problem with media types is encountered.
Methods:
Exception.add_note(note) -- add a note to the exception
Exception.with_traceback(tb) -- set self.__traceback__ to tb and return self.
Attributes:
- add_note()#
Exception.add_note(note) – add a note to the exception
- args#
- with_traceback()#
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception fiftyone.core.media.SelectGroupSlicesError(supported_media_types=None)#
Bases:
ValueError
Exception raised when a grouped collection is passed to a method that expects a primitive media type to be selected.
- Parameters:
supported_media_types (None) – an optional media type or iterable of media types that are supported
Methods:
Exception.add_note(note) -- add a note to the exception
Exception.with_traceback(tb) -- set self.__traceback__ to tb and return self.
Attributes:
- add_note()#
Exception.add_note(note) – add a note to the exception
- args#
- with_traceback()#
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.