Hmm, this is an interesting one. Getting the same error, but also the parameter appears as read-only.
Python scrypt from How to set worksets without using packages thanks @Nick_Boyts
Alternative workflow shown is to dump the reference planes into a selection set and change them all once through the Revit GUI.