Python indentation code error

Hello @guptanikunj.90
Remove the space between + and str in line 16
Hope this information is useful for you::+1:

hey @chetan.kandarkar99


it is still showing an error

Hi @chetan.kandarkar99,

Mixing tabs and spaces can also result in indentation error. One of the possible solution is to avoid such error is to configure you nano editor so that whenever you press tab, it will convert the tabs into spaces and you can define the number spaces you want on each tab.

To do that -
Open /etc/nanorc

sudo nano /etc/nanorc

and add the below line -

set tabsize 4
set tabstospaces

and save the file.

Keep the number of spaces the same for all the code blocks. If you are using 3 spaces then use 3 spaces everywhere and if you are using four spaces then use four spaces everywhere in your code.

Do let me know in case you need any other information.

hi @rahul.singh1
i have re indented the code but still it is showing an error

You need to give a tab under the if statement i.e. an indent
Hope this helps!

hey @abhijitupasani0408
thanks for the help but it is still showing error pls help

Please post screenshot of your conf.py file.

image
sry i had to remove some senstive info

Hi @guptanikunj.90.

The error is in line 5, you entered the Twilio configurations instead of the Bolt configurations. So edit the line 5 of your code as follows:

myBolt = Bolt (conf.API_KEY, conf.DEVICE_ID)

What you wrote before was this:

myBolt = Bolt (conf.SID, conf.AUTH_TOKEN, conf.TO_NUMBER, conf.FROM_NUMBER

Your code should work now.
Hope this helps.