Skip to content

Instantly share code, notes, and snippets.

@drashna
Created September 29, 2023 06:18
Show Gist options
  • Save drashna/0d405a9dd32632cb75c441d4804d33d7 to your computer and use it in GitHub Desktop.
Save drashna/0d405a9dd32632cb75c441d4804d33d7 to your computer and use it in GitHub Desktop.
userspace python log
❯ qmk userspace-doctor ░▒▓ 11.00   40%   6.35G   11G 
--- Logging error ---
Traceback (most recent call last):
File "/usr/local/Cellar/[email protected]/3.11.5/Frameworks/Python.framework/Versions/3.11/lib/python3.11/logging/__init__.py", line 1113, in emit
stream.write(msg + self.terminator)
^^^^^^^^^^^^
AttributeError: 'str' object has no attribute 'write'
Call stack:
File "/usr/local/bin/qmk", line 8, in <module>
sys.exit(main())
File "/usr/local/Cellar/qmk/1.1.2_2/libexec/lib/python3.11/site-packages/qmk_cli/script_qmk.py", line 76, in main
import qmk.cli # noqa
File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 940, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/Users/drashna/repos/qmk_firmware/lib/python/qmk/cli/__init__.py", line 250, in <module>
__import__(subcommand)
File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 940, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/Users/drashna/repos/qmk_firmware/lib/python/qmk/cli/c2json.py", line 8, in <module>
import qmk.keymap
File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 940, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/Users/drashna/repos/qmk_firmware/lib/python/qmk/keymap.py", line 14, in <module>
import qmk.path
File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 940, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/Users/drashna/repos/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 "<frozen importlib._bootstrap>", line 1176, in _find_and_load
File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 940, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/Users/drashna/repos/qmk_firmware/lib/python/qmk/constants.py", line 13, in <module>
QMK_USERSPACE = detect_qmk_userspace()
File "/Users/drashna/repos/qmk_firmware/lib/python/qmk/userspace.py", line 37, in detect_qmk_userspace
qmk_userspace_validate(test_dir)
File "/Users/drashna/repos/qmk_firmware/lib/python/qmk/userspace.py", line 30, in qmk_userspace_validate
UserspaceDefs(path / 'qmk.json')
File "/Users/drashna/repos/qmk_firmware/lib/python/qmk/userspace.py", line 54, in __init__
validate(json, 'qmk.user_repo.v0') # `qmk.json` must have a userspace_version at minimum
File "/Users/drashna/repos/qmk_firmware/lib/python/qmk/json_schema.py", line 89, in validate
validator = create_validator(schema)
File "/Users/drashna/repos/qmk_firmware/lib/python/qmk/json_schema.py", line 80, in create_validator
schema_store = compile_schema_store()
File "/Users/drashna/repos/qmk_firmware/lib/python/qmk/json_schema.py", line 69, in compile_schema_store
cli.log.debug('Skipping schema file %s', schema_file)
Message: 'Skipping schema file %s'
Arguments: (PosixPath('data/schemas/true.jsonschema'),)
--- Logging error ---
Traceback (most recent call last):
File "/usr/local/Cellar/[email protected]/3.11.5/Frameworks/Python.framework/Versions/3.11/lib/python3.11/logging/__init__.py", line 1113, in emit
stream.write(msg + self.terminator)
^^^^^^^^^^^^
AttributeError: 'str' object has no attribute 'write'
Call stack:
File "/usr/local/bin/qmk", line 8, in <module>
sys.exit(main())
File "/usr/local/Cellar/qmk/1.1.2_2/libexec/lib/python3.11/site-packages/qmk_cli/script_qmk.py", line 76, in main
import qmk.cli # noqa
File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 940, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/Users/drashna/repos/qmk_firmware/lib/python/qmk/cli/__init__.py", line 250, in <module>
__import__(subcommand)
File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 940, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/Users/drashna/repos/qmk_firmware/lib/python/qmk/cli/c2json.py", line 8, in <module>
import qmk.keymap
File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 940, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/Users/drashna/repos/qmk_firmware/lib/python/qmk/keymap.py", line 14, in <module>
import qmk.path
File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 940, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/Users/drashna/repos/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 "<frozen importlib._bootstrap>", line 1176, in _find_and_load
File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 940, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/Users/drashna/repos/qmk_firmware/lib/python/qmk/constants.py", line 13, in <module>
QMK_USERSPACE = detect_qmk_userspace()
File "/Users/drashna/repos/qmk_firmware/lib/python/qmk/userspace.py", line 37, in detect_qmk_userspace
qmk_userspace_validate(test_dir)
File "/Users/drashna/repos/qmk_firmware/lib/python/qmk/userspace.py", line 30, in qmk_userspace_validate
UserspaceDefs(path / 'qmk.json')
File "/Users/drashna/repos/qmk_firmware/lib/python/qmk/userspace.py", line 54, in __init__
validate(json, 'qmk.user_repo.v0') # `qmk.json` must have a userspace_version at minimum
File "/Users/drashna/repos/qmk_firmware/lib/python/qmk/json_schema.py", line 89, in validate
validator = create_validator(schema)
File "/Users/drashna/repos/qmk_firmware/lib/python/qmk/json_schema.py", line 80, in create_validator
schema_store = compile_schema_store()
File "/Users/drashna/repos/qmk_firmware/lib/python/qmk/json_schema.py", line 69, in compile_schema_store
cli.log.debug('Skipping schema file %s', schema_file)
Message: 'Skipping schema file %s'
Arguments: (PosixPath('data/schemas/false.jsonschema'),)
--- Logging error ---
Traceback (most recent call last):
File "/usr/local/Cellar/[email protected]/3.11.5/Frameworks/Python.framework/Versions/3.11/lib/python3.11/logging/__init__.py", line 1113, in emit
stream.write(msg + self.terminator)
^^^^^^^^^^^^
AttributeError: 'str' object has no attribute 'write'
Call stack:
File "/usr/local/bin/qmk", line 8, in <module>
sys.exit(main())
File "/usr/local/Cellar/qmk/1.1.2_2/libexec/lib/python3.11/site-packages/qmk_cli/script_qmk.py", line 76, in main
import qmk.cli # noqa
File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 940, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/Users/drashna/repos/qmk_firmware/lib/python/qmk/cli/__init__.py", line 250, in <module>
__import__(subcommand)
File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 940, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/Users/drashna/repos/qmk_firmware/lib/python/qmk/cli/c2json.py", line 8, in <module>
import qmk.keymap
File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 940, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/Users/drashna/repos/qmk_firmware/lib/python/qmk/keymap.py", line 14, in <module>
import qmk.path
File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 940, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/Users/drashna/repos/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 "<frozen importlib._bootstrap>", line 1176, in _find_and_load
File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 940, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/Users/drashna/repos/qmk_firmware/lib/python/qmk/constants.py", line 13, in <module>
QMK_USERSPACE = detect_qmk_userspace()
File "/Users/drashna/repos/qmk_firmware/lib/python/qmk/userspace.py", line 37, in detect_qmk_userspace
qmk_userspace_validate(test_dir)
File "/Users/drashna/repos/qmk_firmware/lib/python/qmk/userspace.py", line 30, in qmk_userspace_validate
UserspaceDefs(path / 'qmk.json')
File "/Users/drashna/repos/qmk_firmware/lib/python/qmk/userspace.py", line 61, in __init__
validate(json, 'qmk.user_repo.v1')
File "/Users/drashna/repos/qmk_firmware/lib/python/qmk/json_schema.py", line 89, in validate
validator = create_validator(schema)
File "/Users/drashna/repos/qmk_firmware/lib/python/qmk/json_schema.py", line 80, in create_validator
schema_store = compile_schema_store()
File "/Users/drashna/repos/qmk_firmware/lib/python/qmk/json_schema.py", line 69, in compile_schema_store
cli.log.debug('Skipping schema file %s', schema_file)
Message: 'Skipping schema file %s'
Arguments: (PosixPath('data/schemas/true.jsonschema'),)
--- Logging error ---
Traceback (most recent call last):
File "/usr/local/Cellar/[email protected]/3.11.5/Frameworks/Python.framework/Versions/3.11/lib/python3.11/logging/__init__.py", line 1113, in emit
stream.write(msg + self.terminator)
^^^^^^^^^^^^
AttributeError: 'str' object has no attribute 'write'
Call stack:
File "/usr/local/bin/qmk", line 8, in <module>
sys.exit(main())
File "/usr/local/Cellar/qmk/1.1.2_2/libexec/lib/python3.11/site-packages/qmk_cli/script_qmk.py", line 76, in main
import qmk.cli # noqa
File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 940, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/Users/drashna/repos/qmk_firmware/lib/python/qmk/cli/__init__.py", line 250, in <module>
__import__(subcommand)
File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 940, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/Users/drashna/repos/qmk_firmware/lib/python/qmk/cli/c2json.py", line 8, in <module>
import qmk.keymap
File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 940, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/Users/drashna/repos/qmk_firmware/lib/python/qmk/keymap.py", line 14, in <module>
import qmk.path
File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 940, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/Users/drashna/repos/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 "<frozen importlib._bootstrap>", line 1176, in _find_and_load
File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 940, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/Users/drashna/repos/qmk_firmware/lib/python/qmk/constants.py", line 13, in <module>
QMK_USERSPACE = detect_qmk_userspace()
File "/Users/drashna/repos/qmk_firmware/lib/python/qmk/userspace.py", line 37, in detect_qmk_userspace
qmk_userspace_validate(test_dir)
File "/Users/drashna/repos/qmk_firmware/lib/python/qmk/userspace.py", line 30, in qmk_userspace_validate
UserspaceDefs(path / 'qmk.json')
File "/Users/drashna/repos/qmk_firmware/lib/python/qmk/userspace.py", line 61, in __init__
validate(json, 'qmk.user_repo.v1')
File "/Users/drashna/repos/qmk_firmware/lib/python/qmk/json_schema.py", line 89, in validate
validator = create_validator(schema)
File "/Users/drashna/repos/qmk_firmware/lib/python/qmk/json_schema.py", line 80, in create_validator
schema_store = compile_schema_store()
File "/Users/drashna/repos/qmk_firmware/lib/python/qmk/json_schema.py", line 69, in compile_schema_store
cli.log.debug('Skipping schema file %s', schema_file)
Message: 'Skipping schema file %s'
Arguments: (PosixPath('data/schemas/false.jsonschema'),)
@bcotton
Copy link

bcotton commented Feb 8, 2024

Did you ever figure out why this is happening? I have the same probem

@drashna
Copy link
Author

drashna commented May 28, 2024

milc, the problem was milc

@uqs
Copy link

uqs commented Jun 7, 2024

Like, what version was the problem though? I get this error after trying from HEAD and I have milc v1.4.2 installed

@drashna
Copy link
Author

drashna commented Jun 7, 2024

it was fixed in 1.6,8, IIRC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment