Sudo python3 device_status.py

This error show .what i can??
plz help this error to solve

In the output we see that you get a message “A connection error occured”:
Possible scenario:
1.Api_key or device_id wrong
2.Your wifi or hotspot is not working maybe if you have connected with your mobile phone you may have forgot to on the mobile data.
3.Your API is blocked for some hour. In this scenario you must have got a mail from the bolt cloud in email I’d you use to sign in your bolt cloud

hii @chhammanlalsahu0210
Your code seems right but still it is showing an error. Sometimes the code of right syntax also throws exceptions or errors . So, try the “try-except” block to prevent from these exceptions. As the internet connection is not necessary to run this program. If there is no internet connection, the output should be:
{“value”: “offline” , “time”: null, “success”:1}
I hope this will work.
Thank you!!

  1. api_key and device_id is correct. i check this many times.
  2. wifi and hotspot is also working proper.
  3. may be this is reason.

Hi @chhammanlalsahu0210,

Check of you is getting internet inside VMware box. To check the internet type the below command-

ping google.com

and send me the screenshot of the output.