I was having the same issue. Then felt it's probably something to do with VS Code. I realized I'd recently reinstalled Python and had not rebooted the IDE since then. Rebooted VS Code and the issue was resolved.