If you get the error message when the scratch disk drive shows a good amount of free space, run a disk defragmentation utility. Clear the Photoshop cache. If you can open Photoshop, delete temporary files from within the program by going to Edit > Purge > All (on Windows) or Photoshop CC > Purge > All (on Mac).