Closed euDominic closed 1 year ago
Strange, probably my workflow is broken somewhere as it works for me but before committing to github I copy paste from notepad to vs code... Will fix it as soon as possible
It is even more strange, I've just taken the same file and it still works in my system. I have even now downloaded the file from github and it still works ok. How did you get the new version?
I copied it from the RAW view and pasted it into my .py file.
src/ca350.py
So this is the problem. You are loosing the utf-8 encoding when doing that. Rather download the file and store where needed. If you do copy/paste of the content make sure the file is in proper encoding - which editor are you using?
Oh dear, yes, that makes sense. I used the winscp editor.
I think the "problem" can be closed.
as always, the error is in front of the monitor 😂.
Cool, I've been there before...
The new version of the phyton script can no longer be started.
Various errors occur from....
root@ComfoAir:/opt/ca350/bin# python3 ca350.py File "/opt/ca350/bin/ca350.py", line 934 state_topic="comfoair/outsidetemp", device_class="temperature", unit_of_measurement="�C", ^ SyntaxError: (unicode error) 'utf-8' codec can't decode byte 0xb0 in position 0: invalid start byte root@ComfoAir:/opt/ca350/bin# ^C root@ComfoAir:/opt/ca350/bin# python3 ca350.py File "/opt/ca350/bin/ca350.py", line 934 state_topic="comfoair/outsidetemp", device_class="temperature", unit_of_measurement="�C", ^ SyntaxError: (unicode error) 'utf-8' codec can't decode byte 0xb0 in position 0: invalid start byte root@ComfoAir:/opt/ca350/bin# python3 ca350.py File "/opt/ca350/bin/ca350.py", line 934 state_topic="comfoair/outsidetemp", device_class="temperature", unit_of_measurement="�C", ^ SyntaxError: (unicode error) 'utf-8' codec can't decode byte 0xb0 in position 0: invalid start byte root@ComfoAir:/opt/ca350/bin# python3 ca350.py File "/opt/ca350/bin/ca350.py", line 939 state_topic="comfoair/supplytemp", device_class="temperature", unit_of_measurement="�C", ^ SyntaxError: (unicode error) 'utf-8' codec can't decode byte 0xb0 in position 0: invalid start byte root@ComfoAir:/opt/ca350/bin# python3 ca350.py File "/opt/ca350/bin/ca350.py", line 1045 state_topic="comfoair/ewttemp", device_class="temperature", unit_of_measurement="�C", ^ SyntaxError: (unicode error) 'utf-8' codec can't decode byte 0xb0 in position 0: invalid start byte root@ComfoAir:/opt/ca350/bin# python3 ca350.py File "/opt/ca350/bin/ca350.py", line 1050 command_topic="comfoair/ewtlowtemp", unit_of_measurement="�C", icon="mdi:thermometer-low", ^ SyntaxError: (unicode error) 'utf-8' codec can't decode byte 0xb0 in position 0: invalid start byte root@ComfoAir:/opt/ca350/bin# python3 ca350.py File "/opt/ca350/bin/ca350.py", line 1050 command_topic="comfoair/ewtlowtemp", unit_of_measurement="�C", icon="mdi:thermometer-low",
The solution was...
to change unit_of_measurement="°C" to unit_of_measurement="°C".