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

VS CODE error: Import "digitalio" could not be resolved pylance(report missing imports) #45

Open
Stuckr opened this issue Oct 21, 2024 · 3 comments

Comments

@Stuckr
Copy link

Stuckr commented Oct 21, 2024

Hello, I am getting this error when I am am trying to:

to Enable usb drive by pressing key when booting up keyboard.

I have reinstalled everything several times but get the same error. I can only find the Digitalio.py file in KMK/scanners. All others I have been unable to locate on the CircuitPY drive.

Is there something I am missing.

Here is a screen capture of the error in VS code.

missing POG keyboard

Thanks for all your help in advance

@JanLunge
Copy link
Owner

is the error only in vs code? because the circuitpython is not the full python interpreter it has other built in libraries that are unique for microcontrollers. I personally dont use linting for the python code and just check the errors in the repl as the vs code linting never really worked for me. maybe there are circuit python plugins for vscode or adjustments you need to do but I haven't tried these

@Stuckr
Copy link
Author

Stuckr commented Oct 21, 2024

Ok that makes sense. That is probably the issue. The keyboard works I just want to add the enable usb function with key press.

Do you a example of the code to do this cause everything I have tried is not working.

Thanks for all the help.

@JanLunge
Copy link
Owner

JanLunge commented Dec 4, 2024

sorry for the late reply, you would add a key with customkeys.ToggleDrive and then when pressing it it would flip the state for next boot so after unplugging and replugging it should hide the drive (and the other way around of course)

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

No branches or pull requests

2 participants