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

ImportError: no module named 'KPU' when running .py script #501

Open
FreySpec opened this issue Feb 9, 2025 · 0 comments
Open

ImportError: no module named 'KPU' when running .py script #501

FreySpec opened this issue Feb 9, 2025 · 0 comments

Comments

@FreySpec
Copy link

FreySpec commented Feb 9, 2025

Hello,

I'm encountering an issue while trying to run my .py script in my IDE. The error message I receive is as follows:

ImportError: no module named 'KPU'

I've already searched through the official documentation and various forums for a solution but haven't found any relevant help addressing this specific problem.

Could anyone provide guidance on how to resolve this ImportError? Is there something specific I need to install or configure to get the 'KPU' module recognized by my script?

Context
I have two scripts. The first script runs without any issues, indicating that the hardware is functioning correctly:

`import sensor
import image
import lcd
import time

lcd.init()
sensor.reset()
sensor.set_pixformat(sensor.RGB565)
sensor.set_framesize(sensor.QVGA)
sensor.run(1)
green_threshold = (0, 80, -70, -10, -0, 30)

while True:
img = sensor.snapshot()
blobs = img.find_blobs([green_threshold])
if blobs:
for b in blobs:
tmp = img.draw_rectangle(b[0:4])
tmp = img.draw_cross(b[5], b[6])
c = img.get_pixel(b[5], b[6])
lcd.display(img)`

However, when I try to run a similar script that includes the KPU module, I encounter the ImportError. Here is the problematic script:

Image

Thank you very much in advance for your assistance.

Best regards,

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

1 participant