The wire to the tank or the sender has a problem. It's not connected, or the tank is not grounded.
Most likely the ground has rusted and not making a good connection.
Where can you access the connections to the fuel tank, do you have to drop the tank?