Skip to content

fix: punktum app module fails to import on Python 3 - #10

Closed
serrebidev wants to merge 1 commit into
josephsl:mainfrom
serrebidev:fix/punktum-encoding
Closed

fix: punktum app module fails to import on Python 3#10
serrebidev wants to merge 1 commit into
josephsl:mainfrom
serrebidev:fix/punktum-encoding

Conversation

@serrebidev

Copy link
Copy Markdown

Problem

addon/appModules/punktum.py is encoded in cp1252 and has German umlauts in its first-line comment, but declares no PEP 263 encoding line. Python 3 assumes UTF-8 when no declaration is present, so the file fails to parse and the Punktum app module never loads:

SyntaxError: Non-UTF-8 code starting with '\xfc' on line 1, but no encoding declared;
see https://peps.python.org/pep-0263/ for details

The offending line is the comment itself:

# Unterst<FC>tzung f<FC>r "Punktum"

It shows up as ISO-8859 text rather than UTF-8, and it is the only module in the add-on in that state — every other file is already UTF-8.

Fix

Re-encode the file as UTF-8. Only the two umlaut bytes change (0xFC becomes 0xC3 0xBC); no code is touched, and no encoding declaration is needed since UTF-8 is the Python 3 default.

Verified with python -m py_compile, which fails before the change and succeeds after.

`appModules/punktum.py` is encoded in cp1252 and carries German umlauts in its
first-line comment, but declares no PEP 263 encoding line. Python 3 assumes
UTF-8 in that case, so the 0xFC bytes abort the parse and the app module never
loads:

    SyntaxError: Non-UTF-8 code starting with '\xfc' on line 1,
    but no encoding declared

Re-encode the file as UTF-8, which is what Python 3 expects by default and what
every other module in the add-on already uses. Only the comment bytes change.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AUFZd6deUGuMmJYnLAvXxL
@serrebidev

Copy link
Copy Markdown
Author

Closing as a duplicate — the punktum UTF-8 re-encode is already covered by #7 and #8, which I missed before opening this.

Note for whichever gets merged: the stray trailing dot on import appModuleHandler. that #7 also fixes appears to be gone from main already, so on current main the encoding is the only remaining problem in that file.

Sorry for the noise.

@serrebidev serrebidev closed this Aug 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant