Negative Commandment #174
Sefer Ha’mitzvos Ha’Katzar (The concise book of mitzvos)
By the Chofetz Chaim
This book lists the Torah mitzvos that can be observed today
Second Section – the Negative Commandments
174. It is a negative commandment "do not inquire from those who have passed away."
As it states in Devarim (Deuteronomy) 18:10-11, "it shall not be found among you... a person who inquires from those who have passed away." This refers to a person who starves himself and sleeps in a cemetery in order that a dead person comes to him in a dream and answers his question. Or if he does some other act so the body of a person who has passed away will come to him and give him answers. He receives lashes for transgressing this commandment.
This applies in all places and at all times, for men and for women.