Explanation
The error occurs when User Profile Service is invoked to unload user attributes for a specific user who is not currently loaded.
Corrective Action
You can first invoke User Profile Service to find out the current loaded users and then choose one to unload.