A reference is made to whatapi.LoginException, but only a module import was made. Importing the class under the same name.
The reference to the config file was incorrect, using the constant.