Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix malformed JSON in layouts/default/ortho_5x10/info.json #23414

Merged
merged 1 commit into from
Apr 4, 2024

Conversation

noroadsleft
Copy link
Member

Description

Fixes a Python error thrown by qmk new-keyboard if a user selects the ortho_5x10 layout.

<class 'json.decoder.JSONDecodeError'>
☒ Expecting value: line 62 column 13 (char 1778)
Traceback (most recent call last):
  File "/home/.../.local/lib/python3.10/site-packages/milc/milc.py", line 604, in __call__
    return self.__call__()
  File "/home/.../.local/lib/python3.10/site-packages/milc/milc.py", line 609, in __call__
    return self._subcommand(self)
  File "/.../qmk_firmware/lib/python/qmk/cli/new/keyboard.py", line 254, in new_keyboard
    augment_community_info(community_info, keyboard(kb_name) / community_info.name)
  File "/.../qmk_firmware/lib/python/qmk/cli/new/keyboard.py", line 80, in augment_community_info
    info = json.loads(src.read_text())
  File "/usr/lib/python3.10/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.10/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.10/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 62 column 13 (char 1778)

Types of Changes

  • Core
  • Bugfix
  • New feature
  • Enhancement/optimization
  • Keyboard (addition or update)
  • Keymap/layout/userspace (addition or update)
  • Documentation

Checklist

  • My code follows the code style of this project: C, Python
  • I have read the PR Checklist document and have made the appropriate changes.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • I have tested the changes and verified that they work and don't break anything (as well as I can manage).

Fixes a Python error thrown by `qmk new-keyboard` if a user selects the
`ortho_5x10` layout.

```
<class 'json.decoder.JSONDecodeError'>
☒ Expecting value: line 62 column 13 (char 1778)
Traceback (most recent call last):
  File "/home/.../.local/lib/python3.10/site-packages/milc/milc.py", line 604, in __call__
    return self.__call__()
  File "/home/.../.local/lib/python3.10/site-packages/milc/milc.py", line 609, in __call__
    return self._subcommand(self)
  File "/.../qmk_firmware/lib/python/qmk/cli/new/keyboard.py", line 254, in new_keyboard
    augment_community_info(community_info, keyboard(kb_name) / community_info.name)
  File "/.../qmk_firmware/lib/python/qmk/cli/new/keyboard.py", line 80, in augment_community_info
    info = json.loads(src.read_text())
  File "/usr/lib/python3.10/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.10/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.10/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 62 column 13 (char 1778)
```

[bugfix]
@noroadsleft noroadsleft added the bug label Apr 4, 2024
@noroadsleft noroadsleft requested a review from a team April 4, 2024 03:36
@github-actions github-actions bot added the keymap label Apr 4, 2024
@noroadsleft
Copy link
Member Author

@zvecr zvecr merged commit b9b8ff8 into qmk:master Apr 4, 2024
2 checks passed
@noroadsleft noroadsleft deleted the fix/layout_ortho_5x10 branch April 4, 2024 07:12
mzyt pushed a commit to mzyt/qmk_firmware that referenced this pull request May 6, 2024
IvanJackson pushed a commit to IvanJackson/qmk_firmware that referenced this pull request May 6, 2024
whoisjordangarcia pushed a commit to whoisjordangarcia/qmk_firmware that referenced this pull request Jun 8, 2024
nuess0r pushed a commit to nuess0r/qmk_firmware that referenced this pull request Sep 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants