Isaiah 8:19-20 (New International Version)
19 When men tell you to consult mediums and spiritists, who whisper and mutter, should not a people inquire of their God? Why consult the dead on behalf of the living? 20 To the law and to the testimony! If they do not speak according to this word, they have no light of dawn.
Leviticus 20:27 (New International Version)
27 " 'A man or woman who is a medium or spiritist among you must be put to death. You are to stone them; their blood will be on their own heads.' "
If God saw that it was OK to seek mediums why did he give this law out in Leviticus. It is a harsh law not just to kick them out of society but to actually put them to death.