Ask Your Question

Cannot use draw() or show() - unexpected argument 'color'

asked 2013-07-30 13:39:18 -0500

anonymous user


updated 2013-07-30 13:40:02 -0500

Every time I call draw() or show() I get the following error: TypeError: draw() got an unexpected keyword argument 'color'

File "C:\Users\<username>\Documents\", line 7, in <module> File "c:\Python27\Lib\site-packages\SimpleCV-1.3-py2.7.egg\SimpleCV\Features\", line 120, in show self.draw(color, width, autocolor) File "c:\Python27\Lib\site-packages\SimpleCV-1.3-py2.7.egg\SimpleCV\Features\", line 93, in draw f.draw(color=color,width=width)

This was all that I was trying to do: import SimpleCV

testimg = SimpleCV.Image('calibration.jpg') calib = testimg.findChessboard((9,6))

edit retag flag offensive close merge delete


Please consider formatting your traceback and code using pre tag.

bendtherules gravatar imagebendtherules ( 2013-08-02 11:27:09 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2013-10-18 02:23:17 -0500

albertmatyi gravatar image

updated 2013-10-18 02:28:57 -0500

Quick and dirty solution:

testimg = SimpleCV.Image('calibration.jpg') 
calib = testimg.findChessboard((9,6)) 

It is because in the calib FeatureSet there is only one Feature the Chessboard(Feature), and this overrides the draw method of its superclass (Feature) that no more accepts color as a parameter. Therefore you cannot call draw on the FeatureSet calib but only on its subelement calib[0].

I'd recommend you getting a good IDE that supports debugging and jumping to definitions, so you could quickly debug these problems yourself. Free IDEs will do it such as:

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2013-07-30 13:39:18 -0500

Seen: 612 times

Last updated: Oct 18 '13