I am not getting the print output after saving the code. And the code window appears again and again. I am posting the screenshot of my code window along with this query.
You can try the following steps to rectify the issue:
- Try restarting the code window.
- Recheck your code.
- If the above steps do not work, try contacting boltiot support - email@example.com. Also attach this code window along with the mail for reference.
Hope you find this helpful.
After saving your code.
this is the following command to run the file:
sudo python3 device_status.py
#following command runs your python file
You might have mistakenly typed the below command:
sudo nano device_status.py
#following command opens the file to edit its content
Hey @dhanugk21 , you need to import the Bolt class from the bolt library by using the following command:
from boltiot import Bolt
This should be the first line of your code! Without this, the function .isOnline() won’t work.
Hello my friend , In your code you need import the bolt python packages. In those packages we have those functions like “Bolt, isOnline”. Without import the bolt package those function will not work .
for import the package you need to write this line of code in the first line or beginning of the program
“from boltiot import Bolt”
I am very grateful for your help!