I was attaching a content database from one SharePoint farm to another and encountered this error.  This issue occurred because the farms were at different path levels.  Once I corrected this the attach worked fine.

image