Running a console command produces an error mentioning sessions. How do I resolve?
You probably have a plugin which is listening to the userSession.onLogin event and trying to access the current user from the session.

The solution is for the plugin developer to wrap the event listener to ignore console sessions like this:

    if(!craft()-&gt;isConsole())
    {
        craft()-&gt;on('userSession.onLogin',
            [
                craft()-&gt;market_customer,
                'loginHandler'
            ]
        );
    }