When I try to use printer, it prompts me with the following error message:
There is no cartridge in the machine
This shows that cartridge is not being detected. Try removing it and cleaning it up. There might be some ink that has stuck or also it could be from the fact that the ink in the catridge has dried up. Confirm it and use another catridge.
In any cases refer to this tip:
Clean and use an inkjet printer