TypeError: an integer is required (got type list)

Traceback (most recent call last):
File “custom_moles_detection.py”, line 8, in
detections = detector.detectObjectsFromImage(input_image=“malignMolehehe.jpg”, output_image_path=“malign-detected.jpg”)
File “/usr/local/lib/python3.7/site-packages/imageai/Detection/Custom/init.py”, line 813, in detectObjectsFromImage
show_percentage=display_percentage_probability)
File “/usr/local/lib/python3.7/site-packages/imageai/Detection/Custom/init.py”, line 1366, in draw_boxes_and_caption
image_frame = cv2.rectangle(image_frame, (x1, y1), (x2, y2), class_color, 2)
TypeError: an integer is required (got type list)
mungbean1:labelImg vidushimeel$

Olefenwa,
What should I do to fix this error?