Hello!
Thank you Mohammad A Maktoomi for finding the fault.
The error was that the Electric was not able to identify the half adder subcircuit which was named as 1_bit_hf_add.
In the definition of subcircuit Electric renamed it as ' _1_bit_hf_' add whereas while calling the sub circuit it became '1_bit_hf_add' in the netlist (.spi file) and thus, the error.
So, we verified by making changes in the erroneous netlist i.e, adding a '_' before the name of the subcircuit and it worked perfectly.
But, still the error persisted and I had to change the netlist manually each time for it to run. Then, I replaced the name of each cell which started with a number(0,1,2...etc) in the Electric library by alphabets and it worked!!!
Now, an error free netlist is generated automatically and simulation also occurs perfectly.