Hi Diana,
Perhaps the database has been updated such that the task_id you are using now has different material_id now associated with it? (this has happened to me before) Try MPRester.get_material_id_from_task_id()
and see if the material_id is identical to the task_id you are using; if not, then rerun MPRester.get_entry_by_material_id()
with the new material_id.
Also see this forum thread for more details: Error querying for a specific material ID
Rachel