bagustris / Apsipa2019_SpeechText

Repository for code and paper submitted for APSIPA 2019, Lanzhou, China
22 stars 5 forks source link

TypeError: label_binarize() takes 1 positional argument but 2 were given #11

Open raniaahmed123 opened 1 year ago

raniaahmed123 commented 1 year ago

hi i have this error when i ran speech_emo.ipynb i couldn't solve this issue. please help thanks

for ses_mod in data2: Y.append(ses_mod['emotion']) Y = label_binarize( Y,emotions_used) Y.shape

TypeError: label_binarize() takes 1 positional argument but 2 were given

bagustris commented 1 year ago

Hi @raniaahmed123 ,

First, check your data_collected.pickle, generated by mocap_data_collect.py. Make sure it is not empty.

Did you change the following line to the location of your IEMOCAP dataset?

https://github.com/bagustris/Apsipa2019_SpeechText/blob/cf28167a4fb6541c4be281a4a8bf3b173ab93faf/code/python_files/mocap_data_collect.py#L34

If you did not change it to your path, it will create empty pickle file.

raniaahmed123 commented 1 year ago

yes i changed the path , the file data_collected.pickle, is generated empty when this line is executed

with open(data_path + '/./'+'data_collected2.pickle', 'w') as handle:

but when i changed that line to the following ,it is generated correctly with open(data_path + '/./'+'data_collected2.pickle', 'wb') as handle:

note: i replaced "w" with "wb"

noadore commented 1 year ago

How did you end up solving this problem, I also ran into this problem.thank you.