I get this error all the time and I know exactly why it happens (at least on my system). Do you have two external (or internal) hard drives named EXACTLY the same? I have two externals named exactly the same since I was planning on doing a sync’d backup…but then I needed the extra space, so I use both now. When having both drives turned on I get the error all the time. It’s because they’re named the same so After Effects doesn’t know which drive you’re talking about.
I hope that helps.