See PEP263. Note that UTF-8 does not appear in the standard encodings list. So maybe try # -- coding = utf_8 -- (lowercase, underscore).