Difficulty in running temp sensor python code

I’m trying to run the python code for temperature sensor and it is giving me an error in this line
I’m attaching the screenshots of them below.
Please help me why is it giving the error.

@akanksha_ugb just before the print statement which is giving error, write this statement:


And then share the screenshot of error

Check if you have a stable internet connection and try again. Similar thing had happened with me. It was because of unstable connection.
Hope this helps!

Thank you so much!! It solved my problem.

Thank you!! My issue got solved by making the internet connection stable.