main.py returns assertion failed
See original GitHub issueIssues should contain the following details which increases the probability of it get resolved quickly
- Exact error or Issue details
D:\python\Human-detection-and-Tracking-master>python main.py -v D:\python\Human-detection-and-Tracking-master\videos
D:\python\Human-detection-and-Tracking-master\videos\VID-20181220-WA0006.mp4*.mp4
['D:\\python\\Human-detection-and-Tracking-master\\videos\\VID-20181220-WA0006.mp4']
Traceback (most recent call last):
File "main.py", line 140, in <module>
recognizer.read("model.yaml")
cv2.error: OpenCV(4.0.0) C:\projects\opencv-python\opencv\modules\core\src\persistence.cpp:2047: error: (-215:Assertion failed) isMap() in function 'cv::FileNode::operator []'
- OpenCV Version - 4.0
- Python 3.x ** Windows 10*
- Changes done, if any in the original code - nope !
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Execute Python files from a main file and stop running when ...
The assertion will always fail here because run returns None , which in turn evaluates to False . A simple fix:
Read more >Python | Assertion Error - GeeksforGeeks
Assertion Error Assertion is a programming concept used while writing a code where the user declares a condition to be true using assert ......
Read more >Python's assert: Debug and Test Your Code Like a Pro
In this tutorial, you'll learn how to use Python's assert statement to document, debug, and test code in development.
Read more >Assertions in Python - Tutorialspoint
If the assertion fails, Python uses ArgumentExpression as the argument for the AssertionError. AssertionError exceptions can be caught and handled like any ...
Read more >Assert in Python - TutorialsTeacher
Syntax. assert condition [, Error Message]. The following example demonstrates a simple assert statement. Example: assert.
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
I had the same exact issue, but then I fixed it by reading better the docs! 😃 I just had to rebuild model.yaml by running
python create_face_model.py
i met this error too,do you solve it?