qmk/qmk_firmware

[Bug] `AttributeError: module 'idna' has no attribute 'IDNAError'` when I run `qmk`

Open

#23.893 aperta il 10 giu 2024

Vedi su GitHub
 (8 commenti) (1 reazione) (0 assegnatari)C (43.867 fork)batch import
bughelp wanted

Metriche repository

Star
 (20.368 star)
Metriche merge PR
 (Merge medio 20g 9h) (27 PR mergiate in 30 g)

Descrizione

Describe the Bug

I wanted to update my keyboard layout by adding another Caps Lock key (long story), so I ran qmk userspace-compile. However, I got the following error:

~/Projects/zweihander (main) > qmk userspace-compile
Traceback (most recent call last):
  File "/opt/homebrew/bin/qmk", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/opt/homebrew/Cellar/qmk/1.1.5_1/libexec/lib/python3.12/site-packages/qmk_cli/script_qmk.py", line 76, in main
    import qmk.cli  # noqa
    ^^^^^^^^^^^^^^
  File "/Users/comatoast/Projects/Others/qmk_firmware/lib/python/qmk/cli/__init__.py", line 253, in <module>
    __import__(subcommand)
  File "/Users/comatoast/Projects/Others/qmk_firmware/lib/python/qmk/cli/ci/validate_aliases.py", line 5, in <module>
    from qmk.keyboard import resolve_keyboard, keyboard_folder, keyboard_alias_definitions
  File "/Users/comatoast/Projects/Others/qmk_firmware/lib/python/qmk/keyboard.py", line 10, in <module>
    import qmk.path
  File "/Users/comatoast/Projects/Others/qmk_firmware/lib/python/qmk/path.py", line 8, in <module>
    from qmk.constants import MAX_KEYBOARD_SUBFOLDERS, QMK_FIRMWARE, QMK_USERSPACE, HAS_QMK_USERSPACE
  File "/Users/comatoast/Projects/Others/qmk_firmware/lib/python/qmk/constants.py", line 7, in <module>
    from qmk.userspace import detect_qmk_userspace
  File "/Users/comatoast/Projects/Others/qmk_firmware/lib/python/qmk/userspace.py", line 6, in <module>
    import jsonschema
  File "/opt/homebrew/Cellar/qmk/1.1.5_1/libexec/lib/python3.12/site-packages/jsonschema/__init__.py", line 13, in <module>
    from jsonschema._format import FormatChecker
  File "/opt/homebrew/Cellar/qmk/1.1.5_1/libexec/lib/python3.12/site-packages/jsonschema/_format.py", line 287, in <module>
    raises=(idna.IDNAError, UnicodeError),
            ^^^^^^^^^^^^^^
AttributeError: module 'idna' has no attribute 'IDNAError'

I get this error whenever I run qmk, no matter what I put after it, whether it's nothing, userspace-compile, or --help.

Keyboard Used

ergodox_ez

Link to product page (if applicable)

No response

Operating System

macOS 14.5 (Sonoma)

qmk doctor Output

Traceback (most recent call last):
  File "/opt/homebrew/bin/qmk", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/opt/homebrew/Cellar/qmk/1.1.5_1/libexec/lib/python3.12/site-packages/qmk_cli/script_qmk.py", line 76, in main
    import qmk.cli  # noqa
    ^^^^^^^^^^^^^^
  File "/Users/comatoast/Projects/Others/qmk_firmware/lib/python/qmk/cli/__init__.py", line 253, in <module>
    __import__(subcommand)
  File "/Users/comatoast/Projects/Others/qmk_firmware/lib/python/qmk/cli/ci/validate_aliases.py", line 5, in <module>
    from qmk.keyboard import resolve_keyboard, keyboard_folder, keyboard_alias_definitions
  File "/Users/comatoast/Projects/Others/qmk_firmware/lib/python/qmk/keyboard.py", line 10, in <module>
    import qmk.path
  File "/Users/comatoast/Projects/Others/qmk_firmware/lib/python/qmk/path.py", line 8, in <module>
    from qmk.constants import MAX_KEYBOARD_SUBFOLDERS, QMK_FIRMWARE, QMK_USERSPACE, HAS_QMK_USERSPACE
  File "/Users/comatoast/Projects/Others/qmk_firmware/lib/python/qmk/constants.py", line 7, in <module>
    from qmk.userspace import detect_qmk_userspace
  File "/Users/comatoast/Projects/Others/qmk_firmware/lib/python/qmk/userspace.py", line 6, in <module>
    import jsonschema
  File "/opt/homebrew/Cellar/qmk/1.1.5_1/libexec/lib/python3.12/site-packages/jsonschema/__init__.py", line 13, in <module>
    from jsonschema._format import FormatChecker
  File "/opt/homebrew/Cellar/qmk/1.1.5_1/libexec/lib/python3.12/site-packages/jsonschema/_format.py", line 287, in <module>
    raises=(idna.IDNAError, UnicodeError),
            ^^^^^^^^^^^^^^
AttributeError: module 'idna' has no attribute 'IDNAError'

Is AutoHotKey / Karabiner installed

  • AutoHotKey (Windows)
  • Karabiner (macOS)

Other keyboard-related software installed

No response

Additional Context

No response

Guida contributor