Give proper spacing in all the blocks because your code is showing indentation error and it is because of spacing in some of the blocks.
Go through the code again and provide proper spacing and write it according to block.
Apart from following what @dixitupagyya23 said. Make sure you’re consistent with tabs and spaces. Do not mistake one for the other just because they might be providing similar spacing visually.
hello @surajprakash267 please do check your code at the line where you have typed except Exception as e : if there is a space after e, then that’s the cause of this error. just change it to e: