Led control using bolt python library while running the program showing a connection error occurred

sir, I have written the python script as shown in the tutorial and saved properly
while executing the python script status shows success: ‘0’ but a massage is showing "A connection error occurred " I already checked all connection related problems and tried controlling using bolt cloud then it is working properly, it will really helpful to me

Hi @000bhaskarsaikia,

Usually connection error occurs when there is no internet inside Vmware. To check if internet is working, type the below commands and send the screenshot of the output.

ping google.com
1 Like

Thank you sir, for your help, the screenshot is attached below

Hi @000bhaskarsaikia,

Add the dns server and check if it is working.

Open /etc/resolv.conf file using the below command.

sudo nano /etc/resolv.conf

add the below lines in the file.

nameserver 8.8.8.8
nameserver 8.8.4.4

And then check if pinging to google is working.

1 Like

hello sir, thank you for your assistance, i have followed all the steps and again pinged google and it did worked and thank you for the replies it helped me a lot, i am attaching a screenshot below have a look

1 Like

HI @000bhaskarsaikia,

Are you able to control your devices from python script ?

1 Like

yes sir i was able to control the device from python script, but once i switched off the virtual machine and reopen it again same problems are showing as before and then i tried to do the steps you said but this time it is not working while pinging google.com it shows unknown host google.com