You do not say which printer, but generally this is caused by changing the
tank BEFORE it is truly empty.
To try to reset the sensor open the top and remove the tank and replace with
an empty. Now close the top and turn the printer off. When you power back on
replace the empty with a at least 1/2 full cart.
I have not had that problem using blanks that I refill. The only thing
that would cause that problem is the generic cartridge may not have
the "prism" on the bottom inside of the liquid tank.
I have seen several cartridges and read about some generics not having
the prism that is needed in order to set off the low ink warning. It
is easily visible if you look for it.