CascadeClassifier is empty

Char '\' has special meaning in any string - even in path

ie. '\n' means new line, '\t' means tabulator, etc.

And you have '\test' in path so it treats '\t' as tabulator.

You may use prefix 'r' to create 'raw' string and then '\'will be treated as normal char

r"C:\Hamid\test\haarcscade_eye.xml"

or you have to use double '\\'

"C:\\Hamid\\test\\haarcscade_eye.xml"

or you can try to use '/' like in Linux

"C:/Hamid/test/haarcscade_eye.xml"