I had the same incorrect in High Sierra after moving my boot disk to an external SSD drive and pointing my user account home folder to the old disk. I guess the Migration Assistant might have fixed this, had I intended to migrate everything, but I don't think it would allow importing a user folder to a different drive.
I cloned my home folder to a non-encrypted APFS disk and yet the library had the same error.
I discovered that I could create a new account on my computer and sync all the iCloud photos with zero issues if I logged into iCloud, so I knew for certain that it was something buried in settings in my account.
I ended up deleting the settings files for all the related apps and services, after which it worked fine. Specifically inside the Library of my home folder (otherwise referred to as ~/Library or /Users/username/Library) inside the Containers folder (where settings and files of apps and services are isolated for security) I removed the following folders:
com.apple.cloudphotosd
com.apple.photolibraryd
com.apple.Photos
com.apple.Photos.librarychooserservice
The latter didn't seem to have any settings in it, so it was probably unnecessary but at the time my idea was to remove all settings for all Apple-related photos apps and services.
I logged out and logged in for good measure, then I could re-enable Cloud sync without the obviously incorrect error. The only down side was that it had to sync my entire library again. It says that it is uploading all of my photos again, but this is obviously not true. It did use quite a bit of bandwidth but it wasn't as much as a whole library upload would take, so I'm fairly certain that it was really actually synchronising the local and iCloud libraries.
Now if only I knew the specific setting that had to be deleted to fix this...