Bolt not defined error

project 6:after entering all the necessary details like api and device id in the below program

from boltiot import Bolt
device_id = “BOLTXXXXXX”
mybolt = Bolt(api_key, device_id)
response = mybolt.isOnline()
print (response)

I entered my api key and device id
but its showing error …like

Name error;Name ‘Bolt’ is not defined
help me out with this

You have to set up the BOLT library.

sudo pip3 install boltiot
Even after this its showing the same…

@deepakparabhu2205 Do you have another file with the name as in your directory? If yes, then please rename it and try again.
The rename command is,
sudo mv

I am getting an error in this step i have mentioned above screen shot

Please refer here -

Hi @chandana7975628933,

Is your issue resolved ?

hello sir i am facing an issue in project 11 can u pls look at the errors which i have shared in the above screen shot

share a snap of your conf file

check bolt_api_key attribute in conf file i think there is typo in conf file

according to this snap you assigned api key as api_key in code

  • correction:-change bolt_api_key ->api_key in your code

i hope this will solve your problem :grin:

change bolt_api_key -> api_key in code

Your filename is conf1. Make necessary changes in the file accordingly.

  1. import conf1
  2. Change conf.bolt_api_key to conf1.bolt_api_key. Make similar changes for device ID, telegram_bot_id, telegram_chat_id as well.
  3. Your telegram_chat_id in is incorrect as well. Correction - "@chandura25"

Let me know if you need any other information.

1 Like

where will we get our telegram_chat_id???

It’s the ID of your telegram channel that you created. Make sure you’ve added the bot as an admin in there. Once your channel is created, you must have seen the link as In that case your chat ID is @chandura25.

Next time make sure to create a new topic to get your issue resolved.

Let me know if you need any other information.

do as above post says and also dont forget to change bolt_api_key -> api_key in code
or change api_key -> bolt_api_key in conf1 file

I am facing the same issue

Can anyone help


Can you share the code you’re implementing?