Steps to the Reproduce:
When switching from Python 3.8 to 3.9 I came across the same error (also with pylint). I simply edited the project.pyproj (xml) file from: Global|PythonCore|3.8 to: Global|PythonCore|3.9.
Global|PythonCore|3.8
Global|PythonCore|3.9