Skip to content

weather-and-light example fails with SyntaxError #78

@markmcgookin

Description

@markmcgookin

Clean Raspbian Lite install, one line installer for dependencies, clone this repo to directory, navigate to repo and call "python weather-and-lite.py' on a raspberry pi zero causes the following error

File "weather-and-light.py", line 380
SyntaxError: Non-ASCII character '\xc2' in file weather-and-light.py on line 380, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details

Adding

# -*- coding: utf-8 -*-

to the file removes this issue, but then you get the following error:

  File "weather-and-light.py", line 381
    temp_string = f"{corr_temperature:.0f}°C"
                                             ^
SyntaxError: invalid syntax

Removing the °C still causes this error

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions