Metasploit error db_autopwn

msf6 > db_autopwn -p -t -PI 22
[-] The db_autopwn command is DEPRECATED
[-] See Six Ways to Automate Metasploit | Rapid7 Blog instead
[-] Error while running command db_autopwn: undefined method `new’ for nil:NilClass

Call stack:
/usr/share/metasploit-framework/plugins/db_autopwn.rb:177:in block (2 levels) in cmd_db_autopwn' /usr/share/metasploit-framework/lib/msf/core/module_set.rb:232:in block in each_module_list’
/usr/share/metasploit-framework/lib/msf/core/module_set.rb:208:in each' /usr/share/metasploit-framework/lib/msf/core/module_set.rb:208:in each_module_list’
/usr/share/metasploit-framework/lib/msf/core/module_set.rb:74:in each_module' /usr/share/metasploit-framework/plugins/db_autopwn.rb:176:in block in cmd_db_autopwn’
/usr/share/metasploit-framework/plugins/db_autopwn.rb:175:in each' /usr/share/metasploit-framework/plugins/db_autopwn.rb:175:in cmd_db_autopwn’
/usr/share/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:581:in run_command' /usr/share/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:530:in block in run_single’
/usr/share/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:524:in each' /usr/share/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:524:in run_single’
/usr/share/metasploit-framework/lib/rex/ui/text/shell.rb:165:in block in run' /usr/share/metasploit-framework/lib/rex/ui/text/shell.rb:309:in block in with_history_manager_context’
/usr/share/metasploit-framework/lib/rex/ui/text/shell/history_manager.rb:35:in with_context' /usr/share/metasploit-framework/lib/rex/ui/text/shell.rb:306:in with_history_manager_context’
/usr/share/metasploit-framework/lib/rex/ui/text/shell.rb:133:in run' /usr/share/metasploit-framework/lib/metasploit/framework/command/console.rb:54:in start’
/usr/share/metasploit-framework/lib/metasploit/framework/command/base.rb:82:in start' /usr/bin/msfconsole:23:in
msf6 > Call stack:

Stop using db_autopwn and find some alternatives