For me, simply deleting the .python_version file which was created after I ran pyenv local 3.XX.XX resolved the error message.
.python_version
pyenv local 3.XX.XX