Skip to content

No attribute 'get_wch' when running as a nix-shell #143

@aneziac

Description

@aneziac

Got this error when pressing 'a'. MacOS Sonoma 14.5.

❯ nix-shell -p calcure
these 11 paths will be fetched (1.97 MiB download, 17.44 MiB unpacked):
  /nix/store/739vak80n3abvchlqmysx98li0ikjiil-calcure-3.2.1
  /nix/store/8k4vcvnd5rdswrh7nq3bkgyasd4g7c0c-python3.13-holidays-0.80
  /nix/store/awcaalzfzkni9rmdc5gsbynqkva3cpav-python3.13-icalendar-6.3.1
  /nix/store/pnzmh4n7g1j52yp8392fk6v2l31bgbih-python3.13-jalali-core-1.0.0
  /nix/store/sn79izgxbmmngda521p1r0nw0gc1cji2-python3.13-jdatetime-5.2.0
  /nix/store/s304n7alk23wh2sswfw9acirjgkz29yi-python3.13-kitchen-1.2.6
  /nix/store/rqs56zdkaqjz1x6347qvxvg4c56h9bny-python3.13-python-dateutil-2.9.0.post0
  /nix/store/l7hqdnhs33ys1bih22lcc5dy1xm3vhxd-python3.13-pytz-2025.2
  /nix/store/rbaxlirh44h5bj4l9kc23lf1zfw0c9kp-python3.13-six-1.17.0
  /nix/store/7w7sxlpwb3zs9w55baxi8cvl8ixlafj6-python3.13-taskw-2.0.0
  /nix/store/l03l22b1xl04nlds7zaq93z6zayamiz4-python3.13-tzdata-2025.2
copying path '/nix/store/pnzmh4n7g1j52yp8392fk6v2l31bgbih-python3.13-jalali-core-1.0.0' from 'https://cache.nixos.org'...
copying path '/nix/store/s304n7alk23wh2sswfw9acirjgkz29yi-python3.13-kitchen-1.2.6' from 'https://cache.nixos.org'...
copying path '/nix/store/l7hqdnhs33ys1bih22lcc5dy1xm3vhxd-python3.13-pytz-2025.2' from 'https://cache.nixos.org'...
copying path '/nix/store/l03l22b1xl04nlds7zaq93z6zayamiz4-python3.13-tzdata-2025.2' from 'https://cache.nixos.org'...
copying path '/nix/store/rbaxlirh44h5bj4l9kc23lf1zfw0c9kp-python3.13-six-1.17.0' from 'https://cache.nixos.org'...
copying path '/nix/store/rqs56zdkaqjz1x6347qvxvg4c56h9bny-python3.13-python-dateutil-2.9.0.post0' from 'https://cache.nixos.org'...
copying path '/nix/store/sn79izgxbmmngda521p1r0nw0gc1cji2-python3.13-jdatetime-5.2.0' from 'https://cache.nixos.org'...
copying path '/nix/store/8k4vcvnd5rdswrh7nq3bkgyasd4g7c0c-python3.13-holidays-0.80' from 'https://cache.nixos.org'...
copying path '/nix/store/awcaalzfzkni9rmdc5gsbynqkva3cpav-python3.13-icalendar-6.3.1' from 'https://cache.nixos.org'...
copying path '/nix/store/7w7sxlpwb3zs9w55baxi8cvl8ixlafj6-python3.13-taskw-2.0.0' from 'https://cache.nixos.org'...
copying path '/nix/store/739vak80n3abvchlqmysx98li0ikjiil-calcure-3.2.1' from 'https://cache.nixos.org'...

[nix-shell:~/.local/share/chezmoi]$ calcure
Traceback (most recent call last):
  File "/nix/store/739vak80n3abvchlqmysx98li0ikjiil-calcure-3.2.1/bin/.calcure-wrapped", line 9, in <module>
    sys.exit(cli())
             ~~~^^
  File "/nix/store/739vak80n3abvchlqmysx98li0ikjiil-calcure-3.2.1/lib/python3.13/site-packages/calcure/__main__.py", line 1105, in cli
    curses.wrapper(main)
    ~~~~~~~~~~~~~~^^^^^^
  File "/nix/store/i8r431v9g2hwh9g0kkp2lrgd426szgnq-python3-3.13.7/lib/python3.13/curses/__init__.py", line 94, in wrapper
    return func(stdscr, *args, **kwds)
  File "/nix/store/739vak80n3abvchlqmysx98li0ikjiil-calcure-3.2.1/lib/python3.13/site-packages/calcure/__main__.py", line 1057, in main
    control_monthly_screen(stdscr, screen, user_events, importer)
    ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/739vak80n3abvchlqmysx98li0ikjiil-calcure-3.2.1/lib/python3.13/site-packages/calcure/controls.py", line 39, in inner
    func(stdscr, screen, *args, **kwargs)
    ~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/739vak80n3abvchlqmysx98li0ikjiil-calcure-3.2.1/lib/python3.13/site-packages/calcure/controls.py", line 166, in control_monthly_screen
    day = input_day(stdscr, screen.y_max-2, 0, question)
  File "/nix/store/739vak80n3abvchlqmysx98li0ikjiil-calcure-3.2.1/lib/python3.13/site-packages/calcure/dialogues.py", line 118, in input_day
    number = input_string(stdscr, y, x, prompt_string, 2)
  File "/nix/store/739vak80n3abvchlqmysx98li0ikjiil-calcure-3.2.1/lib/python3.13/site-packages/calcure/dialogues.py", line 96, in input_string
    answer = input_field(stdscr, y, len(question) + x, answer_length)
  File "/nix/store/739vak80n3abvchlqmysx98li0ikjiil-calcure-3.2.1/lib/python3.13/site-packages/calcure/dialogues.py", line 51, in input_field
    key = stdscr.get_wch()
          ^^^^^^^^^^^^^^
AttributeError: '_curses.window' object has no attribute 'get_wch'. Did you mean: 'getch'?

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions