You are not logged in.

#1 2024-12-25 21:35:05

Gendalf@Arch
Member
Registered: 2022-09-18
Posts: 7

qmk stopped working after a recent update

Hi, with the latest qmk update to 1.1.6-1 I'm getting the following:

qmk --version
Traceback (most recent call last):
  File "/usr/bin/qmk", line 5, in <module>
    from qmk_cli.script_qmk import main
  File "/usr/lib/python3.13/site-packages/qmk_cli/script_qmk.py", line 18, in <module>
    milc.cli.milc_options(version=__version__)
    ^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'MILC' object has no attribute 'milc_options'

According to the vendor of qmk_cli it now requires python 'milc' package >=1.9.0 but the system wide Arch's 'milc' version is 1.8.0.
https://github.com/qmk/qmk_cli/commit/8 … a9a0b01f21

$ pip freeze | grep milc
milc==1.8.0

So far downgrading to qmk-1.1.5-3 is working for me.

Last edited by Gendalf@Arch (2024-12-25 21:41:48)

Offline

#2 2024-12-26 00:48:22

Swivel
Member
Registered: 2021-05-24
Posts: 2

Re: qmk stopped working after a recent update

Same issue is happening to me as well. I only have qmk-1.1.5-1 and qmk-1.1.5-2. Both throw No module named 'qmk_cli'` when I try to run them after downgrading.

While I wouldn't really recommend it, I got around this with:

pip install milc==1.9.0 --break-system-packages

Last edited by Swivel (2024-12-26 00:53:13)

Offline

#3 2024-12-26 08:51:47

arojas
Developer
From: Spain
Registered: 2011-10-09
Posts: 2,162

Re: qmk stopped working after a recent update

The right place to report this is gitlab.

Offline

#4 2024-12-26 16:24:39

twelveeighty
Member
From: Alberta, Canada
Registered: 2011-09-04
Posts: 1,219

Re: qmk stopped working after a recent update

pip install milc==1.9.0 --break-system-packages

Don't do this. If/when the packaging bug is fixed, you will face a problem with your next update, since pip borked your Python package(s). You could try installing milc 1.9.0 safely inside a Python venv (as your regular non-root user) and perhaps running qmk from inside the venv will use the venv's milc. Haven't tested this, but it would be a much safer workaround.

Offline

#5 2024-12-26 19:48:49

Gendalf@Arch
Member
Registered: 2022-09-18
Posts: 7

Re: qmk stopped working after a recent update

Swivel wrote:

Same issue is happening to me as well. I only have qmk-1.1.5-1 and qmk-1.1.5-2. Both throw No module named 'qmk_cli'` when I try to run them after downgrading.

While I wouldn't really recommend it, I got around this with:

pip install milc==1.9.0 --break-system-packages

I followed this article to download qmk-1.1.5-3
https://wiki.archlinux.org/title/Arch_L … al_Archive

sudo pacman -U https://archive.archlinux.org/packages/q/qmk/qmk-1.1.5-3-any.pkg.tar.zst

Offline

#6 2024-12-26 20:16:29

progandy
Member
Registered: 2012-05-17
Posts: 5,277

Re: qmk stopped working after a recent update

It looks like qmk is the only package depending on milc, so you could try to update the version in the PKGBUILD and try  to build your own up to date version.

https://gitlab.archlinux.org/archlinux/ … ython-milc

Last edited by progandy (2024-12-26 20:18:24)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#7 2024-12-26 21:35:55

loqs
Member
Registered: 2014-03-06
Posts: 18,227

Re: qmk stopped working after a recent update

progandy wrote:

It looks like qmk is the only package depending on milc, so you could try to update the version in the PKGBUILD and try  to build your own up to date version.

$ qmk --version
Traceback (most recent call last):
  File "/usr/bin/qmk", line 5, in <module>
    from qmk_cli.script_qmk import main
  File "/usr/lib/python3.13/site-packages/qmk_cli/script_qmk.py", line 18, in <module>
    milc.cli.milc_options(version=__version__)
    ^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'MILC' object has no attribute 'milc_options'
$ pkgctl repo clone --protocol https python-milc
$ cd python-milc/
$ pkgctl build --pkgver=1.9.0
# pacman -U python-milc-1.9.0-1-any.pkg.tar.zst
$ qmk --version
1.1.6

That appears to work.

Offline

#8 2024-12-27 08:26:54

Gendalf@Arch
Member
Registered: 2022-09-18
Posts: 7

Re: qmk stopped working after a recent update

loqs wrote:

That appears to work.

Thank you! Good to know the option! smile Though it didn't work for me on a system with hardened kernel (not sure if it matters).
The system is not set up for Arch development, just added devtools package, something may be missing.

$ pkgctl build --pkgver=1.9.0
...
==> Building python-milc for [extra] (x86_64)
execv(pacman) failed: Permission denied
==> ERROR: Aborting...
$ sudo pkgctl build --pkgver=1.9.0
...
==> ERROR: Running makepkg as root is not allowed as it can cause permanent,
catastrophic damage to your system.
==> ERROR: Failed to generate new checksums

After that I did build the python-milc 1.9.0 package in a VM but was getting (now different) errors in my main system when running qmk with it:

$ qmk --version
Traceback (most recent call last):
  File "/usr/bin/qmk", line 5, in <module>
    from qmk_cli.script_qmk import main
  File "/usr/lib/python3.13/site-packages/qmk_cli/script_qmk.py", line 13, in <module>
    import milc
  File "/usr/lib/python3.13/site-packages/milc/__init__.py", line 24, in <module>
    from .milc import MILC
  File "/usr/lib/python3.13/site-packages/milc/milc.py", line 25, in <module>
    from platformdirs import user_config_dir
ModuleNotFoundError: No module named 'platformdirs'

As it is turning into a rabbit hole in my setup, I'd rather live with downgraded qmk 1.1.5-3 for some time.
In my Arch setup too, python-milc is required only for qmk. Hopefully it will be easy for package maintainers to upgrade python-milc to 1.9.0.

Offline

#9 2024-12-27 12:05:25

loqs
Member
Registered: 2014-03-06
Posts: 18,227

Re: qmk stopped working after a recent update

Gendalf@Arch wrote:

As it is turning into a rabbit hole in my setup, I'd rather live with downgraded qmk 1.1.5-3 for some time.

milc switched from appdirs to platformdirs in https://github.com/clueboard/milc/commi … 549ee4a283 as I have platformdirs already installed I did not notice.

Gendalf@Arch wrote:

Hopefully it will be easy for package maintainers to upgrade python-milc to 1.9.0.

Please consider following arojas's suggestion and opening a bug report on Arch's gitlab instance so the package maintainer is aware there is an issue to solve.

Offline

#10 2024-12-27 21:31:01

Gendalf@Arch
Member
Registered: 2022-09-18
Posts: 7

Re: qmk stopped working after a recent update

loqs wrote:

Please consider following arojas's suggestion and opening a bug report on Arch's gitlab instance so the package maintainer is aware there is an issue to solve.

Sorry, I've tried but gave up.
As always with Arch it is a bit of a quest, to find instructions, gitlab account creation is disabled, logging in with github after authorization still requires some (gitlab?) credentials but doesn't tell which ones.
If someone with Arch's gitlab account could ping the maintainer - that may help.
https://gitlab.archlinux.org/archlinux/ … ckages/qmk

Offline

#11 2025-01-27 21:42:04

dawe
Member
Registered: 2024-10-03
Posts: 9

Re: qmk stopped working after a recent update

Offline

#12 2025-01-27 21:56:06

mackin_cheese
Member
Registered: 2025-01-07
Posts: 146

Re: qmk stopped working after a recent update

you didn't need to do that. qmk is now pulling in python-milc 1.9.0 now as a dependancy. I installed it and was able to run it. Uninstall and reinstall qmk and give it a go

Offline

#13 2025-01-27 21:58:49

progandy
Member
Registered: 2012-05-17
Posts: 5,277

Re: qmk stopped working after a recent update

mackin_cheese wrote:

you didn't need to do that. qmk is now pulling in python-milc 1.9.0 now as a dependancy. I installed it and was able to run it. Uninstall and reinstall qmk and give it a go

The bug reported is the platformdirs dependency that is not declared in the new package, so the bug report is still valid. You can fix your system with a manual installation of python-platformdirs, though.

Last edited by progandy (2025-01-27 22:01:08)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

Board footer

Powered by FluxBB