-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AttributeError: 'LinearSVC' object has no attribute 'classes_' #1
Comments
Traceback (most recent call last): |
I have the same issue as well |
me too :-( |
pip install scikit-learn==0.15.2 ...it will work |
same problem |
@SarfraazMsa - Thanks a lot! That worked for me! |
great then @ronair01 |
I had issues unpickling the pickle files so I set encoding to latin1 when loading. However, this provided the following error: Traceback (most recent call last): I assume this is because the code is unable to detect the objects as text since the "Objects Containing Text Detected" page is empty. Can anyone help me out here? |
Traceback (most recent call last): File "", line 1, in File "/home/anaconda3/envs/py27/lib/python2.7/site-packages/spyder/utils/site/sitecustomize.py", line 705, in runfile File "/home/anaconda3/envs/py27/lib/python2.7/site-packages/spyder/utils/site/sitecustomize.py", line 94, in execfile File "/home/king/Downloads/pooja project/ImageTextRecognition-master/main.py", line 22, in File "userimageski.py", line 103, in select_text_among_candidates File "/home/anaconda3/envs/py27/lib/python2.7/site-packages/sklearn/utils/metaestimators.py", line 35, in get AttributeError: '_IffHasAttrDescriptor' object has no attribute 'get_attribute' |
Hi guys, sorry but I have not been working on this project for years. The code base is really old and completely outdated. Not really sure how to help here. |
Since downgrading is the solution, I assume we need to change a certain syntax for the newest version of scikit-learn correct? |
yes
yes @rchavezj |
Hi! I have a problem to run your project.
Do you know, what is the problem?
Traceback (most recent call last):
File "/Users/aleh/Development/samples/python/ImageTextRecognition/main.py", line 22, in
maybe_text = user.select_text_among_candidates('/Users/aleh/Development/samples/python/ImageTextRecognition/linearsvc-hog-fulltrain2-90.pickle')
File "/Users/aleh/Development/samples/python/ImageTextRecognition/userimageski.py", line 105, in select_text_among_candidates
is_text = model.predict(self.candidates['flattened'])
File "/Library/Python/2.7/site-packages/sklearn/utils/metaestimators.py", line 37, in
out = lambda _args, *_kwargs: self.fn(obj, args, *kwargs)
File "/Library/Python/2.7/site-packages/sklearn/pipeline.py", line 204, in predict
return self.steps[-1][-1].predict(Xt)
File "/Library/Python/2.7/site-packages/sklearn/linear_model/base.py", line 273, in predict
return self.classes[indices]
AttributeError: 'LinearSVC' object has no attribute 'classes'
The text was updated successfully, but these errors were encountered: