All vibrational calculation by DFT falied due to UnicodeDecodeError

Dear all,

I encountered an interesting bug, so I report this.

When I tried to predict the IR spectrum, all DFT calculations, including B3LYP and wB97X-D, failed. Error message: UnicodeDecodeError: ‘cp932’ codec can’t decode byte 0x93 in position 7680: illegal multibyte sequence. As far as I know, all Windows machines in the Japanese language are suffered from this situation. The other calculation like optimization doesn’t have any problems. Only vibrational calculation doesn’t go well.

I hope someone will revise it or show how to deal with it for Japanese learners.

Hello,

I suspect the issue is caused by your input file having a different encoding when python/psi4 is expecting CP932. In Windows, python’s default encoding assumption depends on your location, and it doesn’t try multiple common encodings if the default fails. It does seem odd that optimizations would work but not frequencies.

If the error is happening when psi4 is trying to read your input file, you could try changing your input file’s encoding. Some text editors can do this. For example, in Notepad++, I can right click in the lower corner to change from UTF-8 (default in the US) to Shift-JIS (should be the same as CP932).

If that doesn’t work, it will be helpful to upload the relevant files if possible.