question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ipdb> AttributeError: "'builtin_function_or_method' object has no attribute 'fourcc'"

See original GitHub issue

Issue 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 (or pip, 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?

  1. cap = cv2.VideoCapture(0)
  2. cap.set(cv2.CAP_PROP_FOURCC, cv2.VideoWriter.fourcc(‘Y’,‘1’,‘6’,’ '))
  3. cap.set(cv2.CAP_PROP_CONVERT_RGB, 0)
  4. 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:closed
  • Created a year ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
Ash-Scommented, Aug 10, 2022

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.

0reactions
Ash-Scommented, Aug 11, 2022

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’.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found