Generating selfie training data using webcam

I am getting an error as :

name: Face_section is not defined!!

Please tell me why i am getting this error?

my code:

hey @prerit_goyal ,
The variable face section is initialized only if any face is detected.
So hence , if there is no face , then this face section is not a variable , but still you are calling to show. Hence it raises an error.

I hope this helped you to understand.

Since the code is same as that in the video taught to me, then how come i get the error and the the tutor did not?!!

P.S. : thank you for the explanation, that did help me to understand what i was doing wrong in the code!! :slight_smile:

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.