**System Information**
any
**Blender Version**
any versions which ship with this template.
**Short description of error**
Error Message:
```
(....) function modal:
incompatible return value , str(, Function.result expected a set, not a NoneType)
```
The current code has a cancel function, which itself doesn't return {'CANCELLED"}, it `returns wm.event_timer_remove(self._timer)`, which doesn't have the expected return type.
**Exact steps for others to reproduce the error**
Open Modal Timer template, Execute, press Esc to cancel the operator.
**Solution - I think is**
Replace the cancel function with
```
def cancel(self, context):
wm = context.window_manager
wm.event_timer_remove(self._timer)
return {'CANCELLED'}
```