I am trying out the that was copied from the github and am having a problem. Disnt change anything in the code, its just straight from caleb github.

When i try to rus : python i get this

Traceback (most recent call last):
File “”, line 15, in <module>
cap = WebcamVideoStream(src=0, height=height, width=width).start()
TypeError: init() got an unexpected keyword argument ‘width’

cant find the solution. Thank you


This link shows the code for the WebcamVideoStream object. The constructor method (i.e., the method used to construct an instance of the class) def init(self, src=0, name=“WebcamVideoStream”) doesn’t show height or width arguments; thus, the TypeError: init () got an unexpected keyword argument ‘width’ message.

I don’t have I would like to see if it contains

from import VideoStream

If it does, then I believe

cap = VideoStream(src=0).start()

should work.

Could you send a link to the code or the code itself.


Hey Dsetin,Thank you yes I have from import WebcamVideoStream.

Yes thanks works great now.


10 points @dsetin19

closed #5