How do I get MV IDE to recognize three components of one object using find_blobs?

I was able to get the code to run and even export a message to an Arduino board. However, i keep running into the problem that sometimes am getting NameError: name ‘blob’ not defined. I have attached the code i think is causing the problem.


while(True):
    clock.tick()                    # Update the FPS clock.
    img = sensor.snapshot()         # Take a picture and return the image.


    #initialize



    for blob.raphe in img.find_blobs([threshold_raphe],pixels_threshold=100,area_threshold=100, merge=True):
        img.draw_rectangle(blob.rect())
        img.draw_cross(blob.cx(),blob.cy())

    if blob.raphe:
        for blob.seed in img.find_blobs([threshold_seed],pixels_threshold=200,area_threshold=200, merge=True):
            img.draw_rectangle(blob.rect())
            img.draw_cross(blob.cx(),blob.cy())
            img.draw_string(blob.x()+2,blob.y()+2,"seed")
            seedX = blob.x()


        for blob.aril in img.find_blobs([threshod_aril],pixels_threshold=300,area_threshold=300, merge=True):
            img.draw_rectangle(blob.rect())
            img.draw_cross(blob.cx(),blob.cy())
            img.draw_string(blob.x()+2,blob.y()+2,"aril")
            arilX = blob.x()


        func_orientation();






    else:
        func_fail()

Hi, you named your object in the iterator loop not blob.

You’ve named things like blob.raphe and blob.april. That’s not a valid name for the code… you need to use just blob.