Skip to content

TypeError: Expected Ptr<cv::UMat> for argument '%s' #15833

@crackwitz

Description

@crackwitz

This is about the uninterpolated '%s' in that error message.

Expected behavior: error message says which argument. In the following case it should have been interpolated to read 'img'.

Run this to reproduce:

import cv2 as cv
cv.line([], (0,0), (10,10), (0,0,255), 2)
# TypeError: Expected Ptr<cv::UMat> for argument '%s'
cv.circle([], (0,0), 10, (0,0,255), 2)
# TypeError: Expected Ptr<cv::UMat> for argument '%s'

Other APIs use the same error reporting scheme but interpolate properly. This bug is probably situated in or near the API implementations themselves.

compare to cv::rectangle, which has a different error reporting scheme:

cv.rectangle([], (0,0), (10,10), (0,0,255), 2)
# TypeError: an integer is required (got type tuple)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions