Not able to check device status on bolt python library

did you first setup the bolt python library?

In order to use the " Bolt " function / functionality. First we have to Install boltiot module in python so that the python script can communicate with our Bolt device through the " Bolt " function in boltiot module. Follow the following steps and still if you have any error please let me know :

step-0 : Make sure you have pip installed, by running the this command : sudo apt install python3-pip

1.Downloading boltiot module in python, Run the following command :

sudo pip3 install boltiot

After thats done try running your python file, to get the status of your bolt device.

If this solution helped you a thumbs up :+1: would be appreciated.

Happy Learning!

Update :
As correctly pointed out by rahul singh that the python file cant be named as a python module. So here is a helpful command to copy file contents and rename your file :

mv ‘type your old file name’ ‘your new file name’

example: mv old_file.txt new_file.txt

This moves the old_file.txt content to new_file and also renames it.

The above command can be used for renaming and moving files and even directories.

1 Like

Hi @iamadhi47,

You can not name a file same as python packages. Since you have installed the boltiot packages of python and also created a file with name, the python will import the file instead of boltiot library.

To check the list of files in current directly, type the below command.

and to remove your file, type the below command

sudo rm 

and then run your file.

Do let me know in case you need further assistance.

1 Like