You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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:
Thank you very much in advance for your assistance.
Best regards,
The text was updated successfully, but these errors were encountered:
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:
Thank you very much in advance for your assistance.
Best regards,
The text was updated successfully, but these errors were encountered: