mlachmish/MusicGenreClassification

While Running formatInput.py and train.py I am getting these error

Closed this issue · 2 comments

after running train.py
screenshot 8
after running formatInput.py
screenshot 9

@DAKSHSEMWAL

In formatInput.py , you have to write the file with write-byte flag like the code below

     with open("data", 'wb') as f:
        f.write(pickle.dumps(data.values()))

In train.py , you have to open the file with read-byte flag like the code below.

Do not forget to load the pickle with encoding of latin1 , otherwise you will get the error complaining that the character can't be represented in ASCII

    with open("labels", 'rb') as f:
        content = f.read()
        labels = pickle.loads(content,encoding='latin1')

I'm sorry to disturb you. Since the link of the data set of this project in the current year is invalid and the author cannot be contacted, I can only ask you in this way. If you still have the data set of this project, could you please send it to me zjq2048@qq.com