In this scenario there is an existing valid environment (created with a .gitignore in it). and performing git clean removes that environment. This causes python extension to detect that the environment has changed. Python extension then tries to look up info to get data on the environment. But there is no environment and that leads to invalid environment notification.