The SP1error code signifies an ignition failure, and E501 says that there was no flame. Thiss may occur due to failing detection electrode, PCB, gas valve, fan, etc. The scope is quite broad, and it takes expertise and professional experience to figure out the problem.
However, there are a couple of things you can try yourself. Clean the ignition electrode. This should be done very carefully, because the slightest deviation of the electrode from the furnace may result in a serious damage. Repairing it will be costly and time-taking.