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

qmk console: dprintf() not getting colored #172

Closed
wants to merge 1 commit into from
Closed

qmk console: dprintf() not getting colored #172

wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented Mar 16, 2024

When getting debug output from my keyboard using qmk console, The output from dprintf() wasn't getting colored, leaving {fg_blue} and {style_reset_all} tags behind and cluttering up

Description

cli.echo('%s', '%(ts)s%(color)s%(identifier)s:%(index)d{style_reset_all}: %(text)s' % message)

removing the first '%s', seems to fix the issue

cli.echo('%(ts)s%(color)s%(identifier)s:%(index)d{style_reset_all}: %(text)s' % message)

Broken

broke
broke-fn

Fixed

fix
fix-fn

@sigprof
Copy link
Contributor

sigprof commented Mar 16, 2024

This effectively reverts the fix from #145 — the old code could not process strings containing % properly.

I can't reproduce the problem using qmk provided by nix-shell; does your qmk come from some other source? Maybe the problem is caused by some other Python modules having unexpected versions.

@ghost ghost closed this Mar 16, 2024
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant