Error in Telegram Project code execution

Hi there! I just received this error while trying to execute my code for the Telegram project:

I tried executing the code without the ‘continue’, and ended up getting blocked from API access because the loop wouldn’t terminate after I pressed CTRL+C.

Here’s the code:

I’m a little sceptical of further trying to rectify the code on my own, so I’d appreciate some guidance ASAP. Thanks in advance!


The if conditions inside the while loop are not properly indented.
Please indent them so that they will be considered to be part of the while loop.

You can follow indentation pattern

while True:
    if sensor_value == -999:
    if sensor_value>..


The solution worked. Thank you.

1 Like

In python language we use indent instead of curly braces as used in c, c++ to tell the code is a part of function or loop, so after while loop in the above mentioned code you should use space to tell that if statement is inside the while loop to specify this we used spaces or indent.