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

[Bug] qmk setup fails with ValueError #8541

Closed
kdheepak opened this issue Mar 23, 2020 · 3 comments
Closed

[Bug] qmk setup fails with ValueError #8541

kdheepak opened this issue Mar 23, 2020 · 3 comments

Comments

@kdheepak
Copy link

kdheepak commented Mar 23, 2020

The output of avr-gcc --version is:

avr-gcc (Homebrew AVR GCC 8.4.0) 8.4.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

This causes the following error:

$ qmk setup kdheepak .

Ψ Found qmk_firmware at ..
Ψ QMK Doctor is checking your environment.
Ψ Detected macOS.
Ψ All dependencies are installed.
Ψ Found arm-none-eabi-gcc version 8.3.1
AVR
<class 'ValueError'>
☒ not enough values to unpack (expected 3, got 1)
Traceback (most recent call last):
  File "/Users/USER/.local/Cellar/qmk/0.0.29/libexec/lib/python3.7/site-packages/milc.py", line 592, in __call__
    return self.__call__()
  File "/Users/USER/.local/Cellar/qmk/0.0.29/libexec/lib/python3.7/site-packages/milc.py", line 597, in __call__
    return self._entrypoint(self)
  File "/Users/USER/gitrepos/qmk_firmware/lib/python/qmk/cli/doctor.py", line 242, in doctor
    if not check_avr_gcc_version():
  File "/Users/USER/gitrepos/qmk_firmware/lib/python/qmk/cli/doctor.py", line 53, in check_avr_gcc_version
    major, minor, rest = version_number.split('.', 2)
ValueError: not enough values to unpack (expected 3, got 1)
☒ Your build environment is not setup completely.
*** Would you like to run util/qmk_install? [y/n] y
Updating Homebrew...

In

version_number = first_line.split()[2]
using

    version_number = first_line.split()[-1]

instead works for me.

@StreakInTheSky
Copy link
Contributor

Found this bug as well, and did the same fix. Not sure if it's strictly a mac/homebrew issue. Which could explain why this was missed.

@fauxpark
Copy link
Member

This might be because the version string changed, so the item at index 2 is now the string "AVR" instead of the version. Perhaps we should use the -dumpversion flag instead:

fauxpark@marissa:~$ avr-gcc -dumpversion
8.4.0
fauxpark@marissa:~$ arm-none-eabi-gcc -dumpversion
8.3.1

@StreakInTheSky
Copy link
Contributor

StreakInTheSky commented Mar 28, 2020

Tried changing is_executable to run with -dumpversion instead, but the other items in ESSENTIAL_BINARIES return status codes greater than 1. So would have to either change the flag for those two items, or just change how it checks the string for avr-gcc, which would be easier.

skullydazed pushed a commit to StreakInTheSky/qmk_firmware that referenced this issue Apr 4, 2020
HokieGeek pushed a commit to HokieGeek/qmk_firmware that referenced this issue Apr 10, 2020
Quarren42 pushed a commit to Quarren42/qmk_firmware that referenced this issue Apr 15, 2020
kylekuj pushed a commit to kylekuj/qmk_firmware that referenced this issue Apr 21, 2020
bitherder pushed a commit to bitherder/qmk_firmware that referenced this issue May 15, 2020
drashna pushed a commit to zsa/qmk_firmware that referenced this issue May 24, 2020
sowbug pushed a commit to sowbug/qmk_firmware that referenced this issue May 24, 2020
nesth pushed a commit to nesth/qmk_firmware that referenced this issue Jun 11, 2020
* upstream/master: (312 commits)
  updated rules.mk and default keymap of Wonderland for VIA support (qmk#8668)
  Added Caps Lock LED handler to wilba.tech PCBs (qmk#8660)
  Add keyboard TGR-910 (qmk#8683)
  V-USB remote wakeup (qmk#7627)
  Add Greek keymap (qmk#8636)
  Add Polish keymap (qmk#8637)
  Add Korean keymap (qmk#8635)
  [Keyboard] Add 60_hhkb layout to hhkb (qmk#8618)
  [Keyboard] romeo - add via layout (qmk#8667)
  [Keyboard] Add ReverseStudio-DecadePad (qmk#8553)
  [Keyboard] Add bat43 Keyboard (qmk#8648)
  minor tweaks
  Fix saving output from avrdude and dfu-programmer
  Use version_arg in ESSENTIAL_BINARIES dict
  Fixes qmk#8541 by getting version from -dumpversion then --version as fallback
  VIA Support: 1upkeyboards Sweet16 (qmk#8652)
  [Keyboard] Lattice60 (qmk#8603)
  Discipline - Add ISO compatibility, rawHID enable, via layout (qmk#8627)
  [Keyboard] Add Orbit-X Keyboard (qmk#8605)
  add 60_tsangan_hhkb layout to GH60 rev. C (qmk#8617)
  ...
fdidron pushed a commit to zsa/qmk_firmware that referenced this issue Jun 12, 2020
jakobaa pushed a commit to jakobaa/qmk_firmware that referenced this issue Jul 7, 2020
thorstenweber83 pushed a commit to thorstenweber83/qmk_firmware that referenced this issue Sep 2, 2020
BorisTestov pushed a commit to BorisTestov/qmk_firmware that referenced this issue May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants