[help!]Kgpg error message:GPG error for improper ioctl operation on device

I have a new problem, I installed kgpg and generated the key, the process went well, when I encrypted a file and then decrypted it, I was prompted with: Error trying to decrypt wallet qpo using GPG. If you are using a smart card, please make sure you have it inserted and try again.

GPG error for improper ioctl operation on device

I checked and someone said to add in ~/.bash_profile.

GPG_TTY=$(tty)
export GPG_TTY

But for me, it didn’t work.

Does anyone know how to solve this problem?

Can anyone solve this problem?