I cannot open system preference panes
Try booting in safe mode. If that works, then you have a process that makes System Preferences show this error. If that doesn't work, create a new user account and check if you can open System Preferences with it. If you can, it's a problem with your user account.