JanLunge / pog

A Kmk firmware flashing and configuration tool
https://pog.heaper.de/
MIT License
362 stars 23 forks source link

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

Open Stuckr opened 1 month ago

Stuckr commented 1 month ago

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 commented 1 month ago

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 commented 1 month ago

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.