Isaiah 8:21-22, NIV(TM): "Distressed and hungry, they will roam through the land; when they are famished, they will become enraged and, looking upward, will curse their king and their God. Then they will look toward the earth and see only distress and darkness and fearful gloom, and they will be thrust into utter darkness."
Sometimes we avoid doing what would obviously be the right thing to do. And following that, sometimes we keep trying everything but what we should do. We'll try anything.
That's the case here. Instead of taking their problems to the Lord, they've at least toyed with the taboo (see Deut 18:10-12 (TM)) idea of trucking with mediums, while avoiding the Lord with their problems.
That refusal is the springboard to a whole world of misery. From that point, they go on to try one thing after another. They have a hunger to see things happen, but find themselves unwilling to seek the Lord. When nothing works, they will become so frustrated that the scripture says they "will curse their king and their God." The irony is a little strong. Grasping at straws, they find themselves completely in the dark.
Paul talks about this in Romans 1:21 (TM) where he says about people who refuse to acknowledge God as God: "their thinking became futile, and their foolish hearts were darkened."
A grim, cautionary tale for us.