mainChannelBox is the entire channel box. You need to change the -selectedMainAttributes flag to whatever is needed to access the shape attributes. The docs on channelBox should give you the options you can play with.