Skip to content

curses.complexchar / in_wch() raise "getcchar() returned ERR" on ncurses 6.1 and 6.2 #154525

Closed

Description

@serhiy-storchaka

On ncurses 6.1 and 6.2, reading a wide-character cell fails:

>>> import curses
>>> str(curses.complexchar('A'))
curses.error: getcchar() returned ERR

This breaks complexchar.__str__/.attr/.pair, window.in_wch(), window.getbkgrnd(), and -- since gh-153395 -- the curses.ascii predicates that stringify a complexchar, so test_curses fails even headless.

curses_getcchar() passes the color pair through the extended-color opts slot, but getcchar() rejected a non-NULL opts before ncurses 6.3 (patch 20210116). setcchar() is unaffected (construction succeeds). main (3.16) only.

Reported by @itamaro.

Linked PRs

Activity

  1. added
    type-bug
    extension-modules
    on Jul 23, 2026
  2. added 2 commits that reference this issue on Jul 23, 2026
  3. added 2 commits that reference this issue on Aug 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    extension-modulestype-bug

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions