bikz05 / digit-recognition

Handwritten Digit Recognition using OpenCV, sklearn and Python
132 stars 90 forks source link

Module Error how to deal it ? #7

Open Cccccc2018 opened 6 years ago

Cccccc2018 commented 6 years ago

When I try to test the classifier, run the performRecognition.py script, I faced this problem, and I have no idea how to deal with that. I tried to run it in python 2 and python 3, it all has problems, hope someone can help me, thank you!

pi@raspberrypi:~/digit-recognition $ python performRecognition.py -c digits_cls.pkl -i photo_1.jpg Traceback (most recent call last): File "performRecognition.py", line 51, in nbr = clf.predict(roi_hog_fd) File "/usr/lib/python2.7/dist-packages/sklearn/linearmodel/base.py", line 228, in predict return self.classes[indices] File "/usr/lib/python2.7/dist-packages/sklearn/svm/base.py", line 709, in classes_ return self.enc.classes AttributeError: 'LinearSVC' object has no attribute '_enc'

moFang222 commented 5 years ago

@Cccccc2018 I encounter the same issue. Have you fixed it?