If your version of Psi is correct, samples should run without modification or needing to “prevent” anything.
Below is some more detailed analysis of your error message. The short version is that I strongly suspect you are using an outdated version of Psi. If you are using an outdated version, use an updated version. If you are not using an outdated version, show me the first five line of your output file and the debug information at the end of your output file.
As for your error message. “has no attribute Vvals” means that the sample is trying to access the Vvals method of an object that doesn’t have a Vvals method. But
wfn.oeprop has a Vvals method in the latest version of Psi, and I would assume that is the Vvals call that’s generating the error. So as long as you’re using the latest version of Psi, we have a paradox.
That said, I’m still not sure you are using the latest version of Psi. The first clue is in the error message itself. Your error message is about “builtin_function_or_method”. If you have the latest version of Psi and the bad Vvals call is in the input file itself, the error message would read “psi4.core.OEProp”.
Assume that the bad Vvals call is somewhere else in the code. I need to figure out where the bad call is. The first step in doing that is for me to have a complete copy of the error message. In recent versions of Psi, right after the error message, there is some additional debug information that would help me. It starts “Printing out the relevant lines from the Psithon --> Python processed input file:”. If you see this information, please give it to me. If you do not see this information, you are not using the correct version of Psi.