Skip to content
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

raise AttributeError(attr + " not found") #2

Open
myrainbowandsky opened this issue Dec 4, 2019 · 0 comments
Open

raise AttributeError(attr + " not found") #2

myrainbowandsky opened this issue Dec 4, 2019 · 0 comments

Comments

@myrainbowandsky
Copy link

How to deal with this issue with python2.7

Traceback (most recent call last):
File "/Users/lawrencexu/Documents/python2pro/Language-Features-for-News-master/Compute_all_features/Compute_all_features.py", line 82, in
NB_pobj, NB_psubj = Functions.subjectivity(text)
File "/Users/lawrencexu/Documents/python2pro/Language-Features-for-News-master/Compute_all_features/resources/feature_functions.py", line 269, in subjectivity
X_new_tfidf = tfidf_transformer.transform(X_new_counts)
File "/Library/Python/2.7/site-packages/scikit_learn-0.20.0-py2.7-macosx-10.15-x86_64.egg/sklearn/feature_extraction/text.py", line 1265, in transform
X = X * self._idf_diag
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/scipy/sparse/base.py", line 303, in mul
return self._mul_sparse_matrix(other)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/scipy/sparse/compressed.py", line 513, in _mul_sparse_matrix
other = self.class(other) # convert to this format
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/scipy/sparse/compressed.py", line 26, in init
if arg1.format == self.format and copy:
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/scipy/sparse/base.py", line 440, in getattr
raise AttributeError(attr + " not found")
AttributeError: format not found

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant