Error in the capstone project code

shows device is offine in the output. how to get it right

connect your bolt iot device to the cloud services, or if you are having problem in connecting the device to the cloud services then download the mobile app of Bolt IoT and proceed the steps.
If still you are having problem share the code here maybe there is some error in coding.

Uploading: IMG_20190814_015441.jpg…

Here is the code. Its directly going to the exception block can u please check