Attribute error in Project 6

When I am trying to restart my device using python, it shows like attribute error: ‘tuple’ object has no attribute ‘restart’.

I attached my code and the outputs with this query

Hii There is error in your code and that is why you are facing this issue. The code to restart should be,

from boltiot import Bolt
api_key = “XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX”
device_id = “BOLTXXXXXX”
mybolt = Bolt(api_key, device_id)
response = mybolt.isOnline()
print (response)

Here in mybolt = Bolt(api_key, device_id) you forgot to write Bolt

I hope this solves your doubt.

On the 4th line of your code u missed to write BOLT function before the arguments (api_key,device_id)
hope this solves your error.

I already fixed it… and thanking you to reply me…
Have a nice day

2 Likes