The following input file works perfectly fine for me.
molecule {
0 2
Mg
F 1 2
}
set reference uhf
_, wfn = energy('scf/cc-pvdz', return_wfn=True)
psi4.oeprop(wfn, 'DIPOLE')
This probably means that:
(a) you’re using an older version of Psi4 than I am, and you found a bug in an old version which is not present in newer versions, or
(b) there are other parts of your input file that are relevant to the problem.
Try the input file I posted. If it fails, we’re in case (a). Tell me what version of Psi4 you’re using. There are instructions here, but it’s going to be in the header of your output file. If it works, we’re in case (b). Try to simplify your input file as much as you can while still maintaining the bug, and let me know what you find.