Hi,
Thanks for posting the error messages.
Is it possible that you're using OpenCV 3 (possibly 3.1)?
In this case, the variable you are looking for might be called:
cv2.cv.CV_CAP_PROP_FRAME_WIDTH
If you make the changes in the source code, everything should work.
Best,
Michael