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

ModuleNotFoundError: No module named 'collections\r' #17

Closed
medasuryatej opened this issue Apr 4, 2022 · 4 comments
Closed

ModuleNotFoundError: No module named 'collections\r' #17

medasuryatej opened this issue Apr 4, 2022 · 4 comments

Comments

@medasuryatej
Copy link

---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
~\AppData\Local\Temp/ipykernel_29176/1367208207.py in <module>
----> 1 from senti_classifier import senti_classifier

C:\Project_Files\Anaconda3\lib\site-packages\senti_classifier\senti_classifier.py in <module>
    227 senti_pickle = resource_stream('senti_classifier', 'data/SentiWn.p')
    228 bag_of_words_pickle = resource_stream('senti_classifier', 'data/bag_of_words.p')
--> 229 synsets_scores = pickle.load(senti_pickle)
    230 bag_of_words = pickle.load(bag_of_words_pickle)
    231 bag_of_words = classify_polarity(bag_of_words)

ModuleNotFoundError: No module named 'collections\r'

I have tried pip install sentiment_classifier though pip install was successful, it didn't pull any files. So I referred to the Stack overflow post https://stackoverflow.com/questions/48521208/nltk-sentiment-classifier-issues-with-install and cloned GitHub repo and replaced the files into the senti_classifier folder. Now I get the above error .

Using Anaconda, Python 3.8, Windows 11

@JediRhymeTrix
Copy link
Contributor

This was resolved in #13 . Looks like the version that you have is outdated. I'd suggest pulling the latest changes from master and giving it a try.

@JediRhymeTrix
Copy link
Contributor

#18 has been merged. Please check if it is working as intended and then I guess we can go ahead and close this.

BTW, @kevincobain2000 if master is stable, maybe publish the changes on pip? It appears that the version on pip is quite old.

@kevincobain2000
Copy link
Owner

About publishing to pip #10 (comment)

@kevincobain2000
Copy link
Owner

It has been a while since I updated it to pip. Let me see if it works

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

3 participants