icalendar.error module#
Errors thrown by icalendar.
- exception icalendar.error.BrokenCalendarProperty[source]#
Bases:
InvalidCalendarA property could not be parsed and its value is broken.
This error is raised when accessing attributes on a
vBrokenproperty that would normally be present on the expected type. The original parse error is chained as__cause__.- add_note(note, /)#
Add a note to the exception
- args#
- with_traceback(tb, /)#
Set self.__traceback__ to tb and return self.
- exception icalendar.error.ComponentEndMissing[source]#
Bases:
IncompleteAlarmInformationWe are missing the end of a component that the alarm is for.
Use Alarms.set_end().
- add_note(note, /)#
Add a note to the exception
- args#
- with_traceback(tb, /)#
Set self.__traceback__ to tb and return self.
- exception icalendar.error.ComponentStartMissing[source]#
Bases:
IncompleteAlarmInformationWe are missing the start of a component that the alarm is for.
Use Alarms.set_start().
- add_note(note, /)#
Add a note to the exception
- args#
- with_traceback(tb, /)#
Set self.__traceback__ to tb and return self.
- exception icalendar.error.FeatureWillBeRemovedInFutureVersion[source]#
Bases:
DeprecationWarningThis feature will be removed in a future version.
- add_note(note, /)#
Add a note to the exception
- args#
- with_traceback(tb, /)#
Set self.__traceback__ to tb and return self.
- exception icalendar.error.IncompleteAlarmInformation[source]#
Bases:
ValueErrorThe alarms cannot be calculated yet because information is missing.
- add_note(note, /)#
Add a note to the exception
- args#
- with_traceback(tb, /)#
Set self.__traceback__ to tb and return self.
- exception icalendar.error.IncompleteComponent[source]#
Bases:
ValueErrorThe component is missing attributes.
The attributes are not required, otherwise this would be an InvalidCalendar. But in order to perform calculations, this attribute is required.
This error is not raised in the UPPERCASE properties like .DTSTART, only in the lowercase computations like .start.
- add_note(note, /)#
Add a note to the exception
- args#
- with_traceback(tb, /)#
Set self.__traceback__ to tb and return self.
- exception icalendar.error.InvalidCalendar[source]#
Bases:
ValueErrorThe calendar given is not valid.
This calendar does not conform with RFC 5545 or breaks other RFCs.
- add_note(note, /)#
Add a note to the exception
- args#
- with_traceback(tb, /)#
Set self.__traceback__ to tb and return self.
- exception icalendar.error.JCalParsingError(message, parser='', path=None, value=<object object>)[source]#
Bases:
ValueErrorCould not parse a part of the JCal.
Create a new JCalParsingError.
- add_note(note, /)#
Add a note to the exception
- args#
- classmethod reraise_with_path_added(cls, *path_components)[source]#
Automatically re-raise the exception with path components added.
- Raises:
JCalParsingError – If there was an exception in the context.
- classmethod validate_list_type(jcal, expected_type, parser='', path=None)[source]#
Validate the type of each item in a jCal list.
- classmethod validate_property(jcal_property, parser, path=None)[source]#
Validate a jCal property.
- Raises:
JCalParsingError – if the property is not valid.
- classmethod validate_value_type(jcal, expected_type, parser='', path=None)[source]#
Validate the type of a jCal value.
- with_traceback(tb, /)#
Set self.__traceback__ to tb and return self.
- exception icalendar.error.LocalTimezoneMissing[source]#
Bases:
IncompleteAlarmInformationWe are missing the local timezone to compute the value.
Use Alarms.set_local_timezone().
- add_note(note, /)#
Add a note to the exception
- args#
- with_traceback(tb, /)#
Set self.__traceback__ to tb and return self.