Skip to content

error #1

@somiyaa

Description

@somiyaa

hello harshit

i am getting the following error:

D:\Twitter-Sentiment-Analysis-master\venv\Scripts\python.exe D:/Twitter-Sentiment-Analysis-master/trainSentiment.py
Traceback (most recent call last):
File "D:/Twitter-Sentiment-Analysis-master/trainSentiment.py", line 34, in
allFeaturesList = getAllFeaturesList()
File "D:\Twitter-Sentiment-Analysis-master\commonUtils.py", line 92, in getAllFeaturesList
allFeaturesList = pickle.load(open(FeaturesListPkl,'rb'))
UnicodeDecodeError: 'ascii' codec can't decode byte 0x8e in position 5: ordinal not in range(128)

i changed 'rb' to 'r' in the following line.
allFeaturesList = pickle.load(open(FeaturesListPkl,'rb'))

error:
Traceback (most recent call last):
File "D:/Twitter-Sentiment-Analysis-master/trainSentiment.py", line 34, in
allFeaturesList = getAllFeaturesList()
File "D:\Twitter-Sentiment-Analysis-master\commonUtils.py", line 92, in getAllFeaturesList
allFeaturesList = pickle.load(open(FeaturesListPkl,'r'))
TypeError: a bytes-like object is required, not 'str'

how to fix this error? this error is coming for all the pickle files.
please help...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions