avatarify-python icon indicating copy to clipboard operation
avatarify-python copied to clipboard

cap.cpp (193) cv::VideoCapture::open VIDEOIO(DSHOW): raised unknown C++ exception

Open dragu opened this issue 6 years ago • 6 comments

Hello, I have an exception when running on windows.

load checkpoints..
cam_fomm.py:35: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
  config = yaml.load(f)
[ERROR:0] global C:\projects\opencv-python\opencv\modules\videoio\src\cap.cpp (193) cv::VideoCapture::open VIDEOIO(DSHOW): raised unknown C++ exception!

Cannot open camera. Try to choose other CAMID in './scripts/settings.sh'

dragu avatar Apr 20 '20 15:04 dragu

similar problem but on mac `[ERROR:0] global /Users/travis/build/skvark/opencv-python/opencv/modules/videoio/src/cap.cpp (193) open VIDEOIO(AVFOUNDATION): raised unknown C++ exception!

Traceback (most recent call last): File "cam_fomm.py", line 221, in cap = VideoCaptureAsync(opt.cam) File "/Users/patrick/Documents/avatarify/videocaptureasync.py", line 17, in init raise RuntimeError("Cannot open camera. Try to choose other CAMID in './scripts/settings.sh'") RuntimeError: Cannot open camera. Try to choose other CAMID in './scripts/settings.sh'`

pmckelvy1 avatar Apr 21 '20 14:04 pmckelvy1

Same @pmckelvy1 #108

HatimLs avatar Apr 22 '20 13:04 HatimLs

same

nanw01 avatar Apr 24 '20 05:04 nanw01

Please follow https://github.com/alievk/avatarify#troubleshooting

alievk avatar Apr 24 '20 16:04 alievk

There is nothing about this Exception

dragu avatar Apr 30 '20 06:04 dragu

I was having the same error, but finally fixed it on my own! Please see image below. In my errors, I found a line that said "Name CamTwist" —— CamTwist was an application/plug-in that I installed months ago, which was clogging the main access to my webcam. I had already uninstalled the application a few weeks ago, but there were some leftover files on my hard-drive, so I went to my Finder > Home > Search: CamTwist, and behold! There were two files with CamTwist included, so I threw them in the trash can, emptied that thing REAL quick, re-ran my code, and WALLAH! I was so happy.

I'd recommend searching for that "Name" line. Perhaps you, too, have installed some silly webcam app that's clogging access!

[Click to view screenshot of my terminal code and where I found the core issue for my bug] https://i.stack.imgur.com/WL7O2.png

Zernach avatar Jul 07 '20 05:07 Zernach