Don't know how we let this one pass :smile: 

Could we use string formatting instead?

```python
raise InvalidFunction(
    'The function {0!r} does not exist in the StateFactory for {1!r}'.format(func, self.module)
)
```