Error: Error connecting DP: cannot read IDR

I guess it is not recoverable. I connected one end of a button to D0 and the other to ground, plugged it in and tried reuploading the sketch. Still the same error