# Attribute Error : 'videoCapture' object has no attribute 'isOpened'

**URL:** <https://forum.opencv.org/t/attribute-error-videocapture-object-has-no-attribute-isopened/7931>\
**Category:** Python\
**Created:** [March 14, 2022, 2:55pm UTC](https://forum.opencv.org/t/attribute-error-videocapture-object-has-no-attribute-isopened/7931 "2022-03-14T14:55:41Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![johnWorker](https://avatars.discourse-cdn.com/v4/letter/j/c4cdca/32.png) [@johnWorker](https://forum.opencv.org/u/johnWorker)\
**Post date:** [March 14, 2022, 2:55pm UTC](https://forum.opencv.org/t/attribute-error-videocapture-object-has-no-attribute-isopened/7931/1 "2022-03-14T14:55:41Z")

</div>

I am trying to record video in a python program. I can see the video on my screen but when I check the video attribute “video.isOpened()” I get an error that says videoCapture has no attribute ‘isOpened’. I am using opencv-python (Version 4.5.5.62) and am using opencv-contrib-python-4.5.5.64. Can anyone point me in the right direction toward solving this problem? I have tried Google but to no avail. Thanks.

---

<div class="post-metadata">

**Author:** ![berak](https://avatars.discourse-cdn.com/v4/letter/b/85f322/32.png) [@berak](https://forum.opencv.org/u/berak)\
**Post date:** [March 14, 2022, 3:43pm UTC](https://forum.opencv.org/t/attribute-error-videocapture-object-has-no-attribute-isopened/7931/2 "2022-03-14T15:43:26Z")

</div>

please show exact code snippet  
(it’s probably something silly)

also:

> [@johnWorker](#):
>
> I am using opencv-python (Version 4.5.5.62) and am using opencv-contrib-python-4.5.5.64.

please do NOT install _both_, only the latter !

---

<div class="post-metadata">

**Author:** ![johnWorker](https://avatars.discourse-cdn.com/v4/letter/j/c4cdca/32.png) [@johnWorker](https://forum.opencv.org/u/johnWorker)\
**Post date:** [March 14, 2022, 3:54pm UTC](https://forum.opencv.org/t/attribute-error-videocapture-object-has-no-attribute-isopened/7931/3 "2022-03-14T15:54:41Z")

</div>

I removed opencv-python and that seems to have fixed the issue. Would it be too difficult to explain why only one of those modules should be installed? I am quite happy to look at documentation and have done so but I did not see any mention of having one or the other installed. The whole pip install opencv-python and importing the module as cv2 is confusing. Is there any source that can give clarity to this? Thanks.

---

<div class="post-metadata">

**Author:** ![berak](https://avatars.discourse-cdn.com/v4/letter/b/85f322/32.png) [@berak](https://forum.opencv.org/u/berak)\
**Post date:** [March 14, 2022, 3:58pm UTC](https://forum.opencv.org/t/attribute-error-videocapture-object-has-no-attribute-isopened/7931/4 "2022-03-14T15:58:38Z")

</div>

> [@johnWorker](#):
>
> Would it be too difficult to explain why only one of those modules should be installed?

both are called cv2, and python can only load one of them at a time.  
(opencv-contrib-python is a “superset” of opencv-python)

---

<div class="post-metadata">

**Author:** ![johnWorker](https://avatars.discourse-cdn.com/v4/letter/j/c4cdca/32.png) [@johnWorker](https://forum.opencv.org/u/johnWorker)\
**Post date:** [March 14, 2022, 4:01pm UTC](https://forum.opencv.org/t/attribute-error-videocapture-object-has-no-attribute-isopened/7931/5 "2022-03-14T16:01:01Z")

</div>

Wow, how unfortunate. Thanks for the help.

---

<div class="post-metadata">

**Author:** ![laurent.berger](https://avatars.discourse-cdn.com/v4/letter/l/ec9cab/32.png) [@laurent.berger](https://forum.opencv.org/u/laurent.berger)\
**Post date:** [March 15, 2022, 4:35pm UTC](https://forum.opencv.org/t/attribute-error-videocapture-object-has-no-attribute-isopened/7931/6 "2022-03-15T16:35:00Z")

</div>

As berak wrote You cannot install both :  
[### Installation and Usage

1. If you have previous/other manually installed (= not installed via `pip` ) version of OpenCV installed (e.g. cv2 module in the root of Python’s site-packages), remove it before installation to avoid conflicts.]([opencv-contrib-python · PyPI](https://pypi.org/project/opencv-contrib-python/))
