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.

main.py returns assertion failed

See original GitHub issue

Issues 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:open
  • Created 5 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
stawocommented, Apr 9, 2019

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

0reactions
leijuzicommented, Jun 27, 2019

i met this error too,do you solve it?

Read more comments on GitHub >

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

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