This error can occur when Moodle tries to access a record in the Moodle database that does not exist. This can happen when you try to view your student profile in Moodle by manually entering the URL in the address bar of your browser. Example if you type http://yourschool.com/user/profile.php?id=12345 into your browser and the 12345 id does not correspond to the id of your Moodle profile you will get this error.
You should always avoid typing a url directly in the address bar of your browser when you are navigating through your Moodle site. Always use the nagigation that is part of Moodle to get around the site.