# Buggy code
def execute_cmd(self, raw_string, session=None, **kwargs):
    """
    Do something as this object. This is never called normally,
    it's only used when wanting specifically to let an object be
    the caller of a command. It makes use of nicks of eventual
    connected accounts as well.

    Args:
        raw_string (string): Raw command input
        session (Session, optional): Session to
            return results to

    Keyword Args:
        Other keyword arguments will be added to the found command
        object instace as variables before it executes.  This is
        unused by default Evennia but may be used to set flags and
        change operating paramaters for commands at run-time.

    Returns:
        defer (Deferred): This is an asynchronous Twisted object that
            will not fire until the command has actually finished
            executing. To overload this one needs to attach
            callback functions to it, with addCallback(function).
            This function will be called with an eventual return
            value from the command execution. This return is not
            used at all by Evennia by default, but might be useful
            for coders intending to implement some sort of nested
            command structure.

    """
    # nick replacement - we require full-word matching.
    # do text encoding conversion
    raw_string = self.nicks.nickreplace(
        raw_string, categories=("inputline", "channel"), include_account=True
    )
    return cmdhandler.cmdhandler(
        self, raw_string, callertype="object", session=session, **kwargs
    )


# Traceback (TypeError)
Traceback (most recent call last):
File "C:\Users\mysti\Documents\MudDev\evenv\Scripts\evennia_launcher.py", line 7, in <module>
exec(compile(f.read(), __file__, 'exec'))
File "C:\Users\mysti\Documents\MudDev\evennia\bin\windows\evennia_launcher.py", line 18, in <module>
main()
File "c:\users\mysti\documents\muddev\evennia\evennia\server\evennia_launcher.py", line 2209, in main
init_game_directory(CURRENT_DIR, check_db=True)
File "c:\users\mysti\documents\muddev\evennia\evennia\server\evennia_launcher.py", line 1746, in init_game_directory
check_database()
File "c:\users\mysti\documents\muddev\evennia\evennia\server\evennia_launcher.py", line 1449, in check_database
evennia._init()
File "c:\users\mysti\documents\muddev\evennia\evennia\__init__.py", line 173, in _init
from .accounts.accounts import DefaultAccount
File "c:\users\mysti\documents\muddev\evennia\evennia\accounts\accounts.py", line 25, in <module>
from evennia.commands import cmdhandler
File "c:\users\mysti\documents\muddev\evennia\evennia\commands\cmdhandler.py", line 47, in <module>
from evennia.comms.channelhandler import CHANNELHANDLER
File "c:\users\mysti\documents\muddev\evennia\evennia\comms\channelhandler.py", line 38, in <module>
_COMMAND_DEFAULT_CLASS = class_from_module(settings.COMMAND_DEFAULT_CLASS)
File "c:\users\mysti\documents\muddev\evennia\evennia\utils\utils.py", line 1464, in class_from_module
mod = importlib.import_module(testpath, package="evennia")
File "c:\program files\python37\lib\importlib\__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "C:\Users\mysti\Documents\MudDev\Mystavaria\commands\command.py", line 14, in <module>
class Command(BaseCommand):
TypeError: NoneType takes no arguments

# Fixed code
def execute_cmd(self, raw_string, session=None, **kwargs):
    """
    Do something as this object. This is never called normally,
    it's only used when wanting specifically to let an object be
    the caller of a command. It makes use of nicks of eventual
    connected accounts as well.

    Args:
        raw_string (string): Raw command input
        session (Session, optional): Session to
            return results to

    Keyword Args:
        Other keyword arguments will be added to the found command
        object instace as variables before it executes.  This is
        unused by default Evennia but may be used to set flags and
        change operating paramaters for commands at run-time.

    Returns:
        defer (Deferred): This is an asynchronous Twisted object that
            will not fire until the command has actually finished
            executing. To overload this one needs to attach
            callback functions to it, with addCallback(function).
            This function will be called with an eventual return
            value from the command execution. This return is not
            used at all by Evennia by default, but might be useful
            for coders intending to implement some sort of nested
            command structure.

    """
    # break circular import issues
    global _CMDHANDLER
    if not _CMDHANDLER:
        from evennia.commands.cmdhandler import cmdhandler as _CMDHANDLER

    # nick replacement - we require full-word matching.
    # do text encoding conversion
    raw_string = self.nicks.nickreplace(
        raw_string, categories=("inputline", "channel"), include_account=True
    )
    return _CMDHANDLER(self, raw_string, callertype="object", session=session, **kwargs)