Can anyone please help me in this


if i take return out from function there is indentation error and if its in function it is showing error please suggest changes

Just shift the “return -999” statement a little bit and make it under your “if” statement and i think it will work just fine.
I also recommend you to shift the “try” and “except” a little bit.
Let me know if it worked

sir, i did that many times but thats showing error thn wid the help of ubuntu keys i used keyword to correct indentation error. All errors regrading try and except are removed only this return -999 is left.

can you send sample of ur code

they are just saying take return -999 outside d function. If i do then its showing error


Here is my code. I hope it helps

no sir the output is still d same

write the whole code again then.

:+1::+1::+1::+1::sleepy: ok sir

is the output same again for line 19?

Try to be consistent with your identation, I suggest using some auto-complete IDE like VS or Sublime Text for practice.
Also, tabs and spaces are considered to be completely different, although the spacing looks the same (like 8 spaces is not equivalent to 2 tabs when you are using nano or shell). Most IDEs will fix that for you.

sir i am using atom,vs code as per the need i knw indentations but as ubuntu is running in vmware so i am not to paste my code if i write in text editor. though i enable indentation but still facing problem

Did you take care of spaces and tabs? IDEs do not have a problem with that but most text editors like ‘nano’ do.

sir is there any option in vm ware to just paste the code wid proper indents???

Copy pasting between the host and VMware should work fine. Just use Ctrl+Shift+V instead of Ctrl+V while pasting in guest OS running on VMware.
Even then, you’ll need to take care of the identations while writing the code. Tabs and spaces are not identical. Stick to just one.
If you are still not comfortable with this solution, you may alternatively install ‘boltiot’ library on your host OS and make it work.

1 Like

@meetk1329 The indents for the try and except blocks in your first function is incorrect.
It should be like,

def function():
    """Doscstring"""
    try:
        # Some code 
    except Exception as e:
        # Exception code

Please note the indentation level used.

sir i again did the coding its showing error not found statements

@meetk1329 That’s great now! We have resolved the previous error that you were facing.
The issue you are facing now, is due to an incorrect config. Check if you config is correct i.e. the chat ID and the Bot key.
Most of the times, it is due an incorrect spelling or confusion between similar looking characters like I/1 or 0/O etc.

as per the lectures i have saved bot id in my contacts and the final thing i paste it

@meetk1329 Please do not post sensitive material like API keys on public forums. I will be deleting the picture that you have posted for your own security.

It seems that you are missing a : in the bot_id after “bot”. Try adding the : and check again if it works.