Ansible 2.19 Exceptions handling

Am I interpreting this error message wrong or is this message going against Python best practices?

Error while resolving value for 'zones': The lookup plugin 'openprovider_contacts' failed: exceptions must derive from BaseException Origin: /runner/project/joost/test.yml:11:16…

From PEP-8 (PEP 8 – Style Guide for Python Code | peps.python.org):

Derive exceptions from Exception rather than BaseException . Direct inheritance from BaseException is reserved for exceptions where catching them is almost always the wrong thing to do.

The error message is saying that an exception was found that is not derived from BaseException. This is actually an error by Python itself, as you can see when you try:

>>> raise 42
Traceback (most recent call last):
  File "<python-input-0>", line 1, in <module>
    raise 42
TypeError: exceptions must derive from BaseException

Also the PEP you are quoting is about exception classes that code defines. The error message is about a failure to adhere to basic Python requirements (that every exception must be derived from BaseException, which is also the case for every exception derived from Exception) by code (in this case, the openprovider_contacts lookup).