That error message usually appears when Docker is not able to build your image and tries to run it so it seem that PyCharm can connect to Docker but the build failed.
First let's see if PyCharm can connect to Docker (by the error you receive I think it does):
If you can see your images and containers, you're connected to Docker. Let's see if your build fails:
Now the Services window will get focused and show the build status. If it fails, you should see the reason there.