I have searched everywhere for a solution for this particular error and tried them all and none worked I have searched in this forum and worked out every answer and it did not work at all.
This is my code:
X_train, Y_train = read_csv('Data/train_emoji_ar.csv')
this is the error I keep getting
Error Traceback (most recent call last)
<ipython-input-2-3f5fe77b4b07> in <module>
----> 1 X_train, Y_train = read_csv('Data/train_emoji_ar.csv')
~\emo_utils.py in read_csv(filename)
38 csvReader = csv.reader(csvDataFile)
39
---> 40 for row in csvReader:
41 phrase.append(row[0])
42 emoji.append(row[1])
Error: line contains NULL byte
and when I open my CSV file that is saved in jupyter note book I see this error:
However, when it is in English it works fine and opens fine unlike when it is in arabic.
The part of my python code in my emo_utils.py which reads the csv:
def read_csv(filename):
phrase = []
emoji = []
with open (filename) as csvDataFile:
csvReader = csv.reader(csvDataFile)
for row in csvReader:
phrase.append(row[0])
emoji.append(row[1])
X = np.asanyarray(phrase)
Y = np.asanyarray(emoji, dtype=int)
return X, Y
so please help me why I keep getting this issue:
I tried using UTF encoding newline and many
None worked