I recently came across this error when importing customizations from a development environment to a fresh CRM environment:
Failure: lead-opportunity: This attribute map is invalid. A valid attribute map must meet these requirements: -	The data type must match. -	The length of the target attribute cannot be shorter than the source attribute. -	The format should match. -	The target attribute must not be used in another mapping. -	The source attribute must be visible on the entity form. -	The target attribute must be a field a user can enter data into. -	Address ID values cannot be mapped.
The first order of business was to check the attributes getting mapped from the lead to the opportunity. All data types matched and none of the target attributes were shorter in length than the source attribute. We did find that one of the target attributes was not present on the Opportunity form. So we corrected that in our source environment, exported the configs again and tried the import only to receive the same error.
So, after quite a bit of poking around the source environment configurations, we took a look at the configurations as they exist in the target environment. As it turns out, we had removed one of the default mappings from the lead-opportunity relationship in our development configuration. When we tried to import the config, CRM does what it's supposed to and does not delete that from the target (it only adds new ones). Since we had deleted the mapping and removed the involved attributes from the entity form, the import failed.
To resolve the issue, we just deleted the attribute mapping from the target environment's lead-opportunity relationship before importing the configs. So the lesson for today is when you see this error and cannot find the culprit, don't forget to check your target environment also.
Comments