First make sure you have purchased the correct cartridge for your printer.
Take the cartridges out of the printer and make sure all the packaging, clips and tape has been removed from the cartridge.
Then while the printer is on pull the power cable out the back of the printer and leave the printer off for 15 minutes. Doing this will give your printer chance to clear the error.
If the cartridge contains a micro chip, while the cartridge is out of the printer give the chip a good wipe with a tissue or cloth.
Turn the printer back on and firmly reinsert the cartridges making sure they are fully clicked into place.
If a full set of cartridges has been purchased then place all the new cartridges in the printer at the same time.