ipdb> AttributeError: "'builtin_function_or_method' object has no attribute 'fourcc'"
See original GitHub issueIssue Report Checklist
- Searched the issues page for similar reports
- Read the relevant sections of the Spyder Troubleshooting Guide and followed its advice
- Reproduced the issue after updating with
conda update spyder
(orpip
, if not using Anaconda) - Could not reproduce inside
jupyter qtconsole
(if console-related) - Tried basic troubleshooting (if a bug/error)
- Restarted Spyder
- Reset preferences with
spyder --reset
- Reinstalled the latest version of Anaconda
- Tried the other applicable steps from the Troubleshooting Guide
- Completed the Problem Description, Steps to Reproduce and Version sections below
Problem Description
ipdb> AttributeError: “‘builtin_function_or_method’ object has no attribute ‘fourcc’”
What steps reproduce the problem?
- cap = cv2.VideoCapture(0)
- cap.set(cv2.CAP_PROP_FOURCC, cv2.VideoWriter.fourcc(‘Y’,‘1’,‘6’,’ '))
- cap.set(cv2.CAP_PROP_CONVERT_RGB, 0)
- cap.set(cv2.CAP_PROP_FORMAT, -1)
What is the expected output? What do you see instead?
raw data out
Paste Traceback/Error Below (if applicable)
PASTE TRACEBACK HERE
Versions
- Spyder version: 3.2.8
- Python version: 2.7
- Qt version:
- PyQt version:
- Operating System name/version: WIN10
Dependencies
IPython >=4.0;<6.0: 5.7.0 (OK) cython >=0.21 : 0.28.2 (OK) jedi >=0.9.0 : 0.12.0 (OK) nbconvert >=4.0 : 5.3.1 (OK) numpy >=1.7 : 1.13.3 (OK) pandas >=0.13.1 : 0.23.0 (OK) pycodestyle >=2.3 : 2.4.0 (OK) pyflakes >=0.5.0 : 1.6.0 (OK) pygments >=2.0 : 2.2.0 (OK) pylint >=0.25 : 1.8.4 (OK) qtconsole >=4.2.0 : 4.3.1 (OK) rope >=0.9.4 : 0.10.7 (OK) sphinx >=0.6.6 : 1.7.4 (OK) sympy >=0.7.3 : 1.1.1 (OK)
PASTE DEPENDENCIES HERE
Issue Analytics
- State:
- Created a year ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Fourcc in cv2 issues - opencv - Stack Overflow
fourcc = cv2.VideoWriter_fourcc('X','2','6','4') AttributeError: 'module' object has no attribute 'VideoWriter_fourcc'.
Read more >'module' object has no attribute 'VideoWriter_fourcc' edit
VideoWriter_fourcc() AttributeError: 'module' object has no attribute ... write this code it works fine with me fourcc = cv2.cv.
Read more >'module' object has no attribute 'VideoWriter_fourcc'
Met this error today: AttributeError: 'module' object has no attribute 'VideoWriter_fourcc' The reason for this error is that the statement ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi @ccordoba12 Thanks for your prompt response. sorry, I couldn’t checked it on time. Thanks for your suggestions. I’d proceed with it and let you know the result. Thanks.
Hi @ccordoba12 yes, i tried to follow the instructions you suggested and replace ‘conda install’ by ‘conda install -c conda-forge’. Installed ‘opencv-python’ using the same but still showing the same ‘No module names cv2’.