Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 5044

Python • CPU Temperature Test Not Working; Need File Format

$
0
0
I tried to use the code on the "Heating and cooling Raspberry Pi 5" page (https://www.raspberrypi.com/news/heatin ... erry-pi-5/) and couldn't get it to work; kept getting this error:

Code:

SyntaxError: Non-UTF-8 code starting with '\xb0' in file /home/<user>/Documents/heatplotter.py on line 10, but no encoding declared; see https://peps.python.org/pep-0263/ for details
I tried going to the python website link, and found out these lines of code were needed:

Code:

#!/usr/bin/python# -*- coding: <encoding name> -*-
This fixed part of the problem, but now I need to know the file type used.

(heatplotter.py is the name of the file with the code in it.)

Statistics: Posted by 83zr5 — Sun Sep 29, 2024 10:30 pm



Viewing all articles
Browse latest Browse all 5044

Trending Articles