burliEnterprises / tensorflow-music-generator

generates music (midi files) using a Tensorflow RNN
https://medium.com/@m_ko/deep-learning-with-tensorflow-part-3-music-and-text-generation-370cf37bb071
131 stars 43 forks source link

AttributeError: 'module' object has no attribute 'read_midifile' #1

Open sreekanth3333 opened 6 years ago

sreekanth3333 commented 6 years ago

Traceback (most recent call last): File "rbm_chords.py", line 36, in songs = get_songs('Pop_Music_Midi') # These songs have already been converted from midi to msgpack File "rbm_chords.py", line 32, in get_songs raise e AttributeError: 'module' object has no attribute 'read_midifile'

I am getting the above error, please help

vivek-sethia commented 6 years ago

I had the same problem.

Have a look at this solution.It works after that: https://stackoverflow.com/a/44288773/5698977

Paras-dua commented 6 years ago

Can anyone explain the working of code? and also about how RBM and Tensorflow are reall being used here?

AnkanDas22 commented 6 years ago

Download the 'midi' module by this command (otherwise it considers it to be python2):

pip install git+https://github.com/vishnubob/python-midi@feature/python3

marcellom commented 6 years ago

For Ubuntu this is the list of dependencies to fix the problem: pip3 install pandas pip3 install msgpack-python pip3 install glob2 pip3 install tqdm pip3 install py-midi pip3 install tensorflow sudo apt-get install swig sudo apt-get install libasound2-dev pip3 install git+https://github.com/vishnubob/python-midi@feature/python3

rick51888 commented 5 years ago

https://github.com/vishnubob/python-midi@feature/python3 is 404 now. What I did as blow: git clone -b feature/python3 https://github.com/vishnubob/python-midi.git python setup.py install

Maybe you will also need: pip3 install libasound2 pip3 install libasound2-dev

lawakesh23 commented 5 years ago

Collecting git+https://github.com/vishnubob/python-midi@feature/python3 Cloning https://github.com/vishnubob/python-midi (to revision feature/python3) to c:\users\lawakesh\appdata\local\temp\pip-req-build-tu19ye3s Error [WinError 2] The system cannot find the file specified while executing command git clone -q https://github.com/vishnubob/python-midi C:\Users\lawakesh\AppData\Local\Temp\pip-req-build-tu19ye3s Cannot find command 'git' - do you have 'git' installed and in your PATH?

@vivek-sethia i found this error, please help me and i am running this : pip install git+https://github.com/vishnubob/python-midi@feature/python3

Vickyilango commented 5 years ago

Collecting git+https://github.com/vishnubob/python-midi@feature/python3 Cloning https://github.com/vishnubob/python-midi (to revision feature/python3) to c:\users\lawakesh\appdata\local\temp\pip-req-build-tu19ye3s Error [WinError 2] The system cannot find the file specified while executing command git clone -q https://github.com/vishnubob/python-midi C:\Users\lawakesh\AppData\Local\Temp\pip-req-build-tu19ye3s Cannot find command 'git' - do you have 'git' installed and in your PATH?

@vivek-sethia i found this error, please help me and i am running this : pip install git+https://github.com/vishnubob/python-midi@feature/python3

Collecting git+https://github.com/vishnubob/python-midi@feature/python3 Cloning https://github.com/vishnubob/python-midi (to revision feature/python3) to c:\users\lawakesh\appdata\local\temp\pip-req-build-tu19ye3s Error [WinError 2] The system cannot find the file specified while executing command git clone -q https://github.com/vishnubob/python-midi C:\Users\lawakesh\AppData\Local\Temp\pip-req-build-tu19ye3s Cannot find command 'git' - do you have 'git' installed and in your PATH?

@vivek-sethia i found this error, please help me and i am running this : pip install git+https://github.com/vishnubob/python-midi@feature/python3

Check if git is installed !