f90 / Wave-U-Net

Implementation of the Wave-U-Net for audio source separation
MIT License
845 stars 177 forks source link

TypeError: super(type, obj): obj must be an instance or subtype of type #23

Closed xdzhangxuejun closed 5 years ago

xdzhangxuejun commented 5 years ago

"ex = Experiment('Waveunet Training', ingredients=[config_ingredient]), super(Experiment, self).init(path=name, TypeError: super(type, obj): obj must be an instance or subtype of type"

f90 commented 5 years ago

I need more information on when this error occurs. What command are you even running? If i had to guess, it looks like the sacred library is not properly installed. Check you have installed all the Python packages as indicated in the requirements.txt file in the repository.

xdzhangxuejun commented 5 years ago

The error occur when i run the program with spyder. However when run in command window,bad things happen like that" xjzhang@xjzhang-ThinkCentre-M910t-N000:~/program/python_program/SiSEC2018/Wave-U-Net-master$ python Training.py /home/xjzhang/anaconda3/envs/py27/lib/python2.7/site-packages/scikits/audiolab/soundio/play.py:48: UserWarning: Could not import alsa backend; most probably, you did not have alsa headers when building audiolab warnings.warn("Could not import alsa backend; most probably, " WARNING - Waveunet Training - No observers have been added to this run INFO - Waveunet Training - Running command 'run' INFO - Waveunet Training - Started SCRIPT START Preparing MUSDB dataset! This could take a while... ERROR - Waveunet Training - Failed after 0:00:00! Traceback (most recent calls WITHOUT Sacred internals): File "Training.py", line 207, in run dsd_train, dsd_test = Datasets.getMUSDB(model_config["musdb_path"]) # List of (mix, acc, bass, drums, other, vocal) tuples File "/home/xjzhang/program/python_program/SiSEC2018/Wave-U-Net-master/Datasets.py", line 136, in getMUSDB rate = track.rate File "/home/xjzhang/anaconda3/envs/py27/lib/python2.7/site-packages/musdb/audio_classes.py", line 245, in rate filename=self.path, stem_id=self.stem_id File "/home/xjzhang/anaconda3/envs/py27/lib/python2.7/site-packages/stempeg/read.py", line 91, in read_stems FFinfo = FFMPEGInfo(filename) File "/home/xjzhang/anaconda3/envs/py27/lib/python2.7/site-packages/stempeg/read.py", line 19, in init self.json_info = read_info(self.filename) File "/home/xjzhang/anaconda3/envs/py27/lib/python2.7/site-packages/stempeg/read.py", line 55, in read_info out = sp.check_output(cmd) File "/home/xjzhang/anaconda3/envs/py27/lib/python2.7/subprocess.py", line 566, in check_output process = Popen(stdout=PIPE, *popenargs, **kwargs) File "/home/xjzhang/anaconda3/envs/py27/lib/python2.7/subprocess.py", line 710, in init errread, errwrite) File "/home/xjzhang/anaconda3/envs/py27/lib/python2.7/subprocess.py", line 1335, in _execute_child raise child_exception OSError: [Errno 2] No such file or directory " . I run the command " pip install -r requirements.txt " and return tip message is "Requirement already satisfied: sacred==0.7.3 in /home/xjzhang/anaconda3/envs/py27/lib/python2.7/site-packages (from -r requirements.txt (line 2)) (0.7.3). "

f90 commented 5 years ago

Check if musdb_path setting in the configuration is pointing to the right path! Looks like the MUSDB library is trying to read your MUSDB dataset copy, but cannot find the audio files. It should point to the main MUSDB dataset folder, which has "test" and "train" subfolders in it. Then try executing again through the commandline

xdzhangxuejun commented 5 years ago

I have done that. But i find the problem occurs in Datasets.py line 127. The program can read something ,however not all data, especially the " rate = track.rate ".

xdzhangxuejun commented 5 years ago

I have test the sacred library and returned tip message "WARNING - 02_hello_config_dict - No observers have been added to this run". Thank you for your help.

f90 commented 5 years ago

Do you mean there was an issue with the sacred library and it is now resolved? How did you fix it?

xdzhangxuejun commented 5 years ago

Sorry! I don't fix it. I just test the sacred library.

f90 commented 5 years ago

What is your stempeg, musdb versions? Also why are you using Anaconda3 with Python 2.7, should it not be Anaconda2?

xdzhangxuejun commented 5 years ago

I find that stempeg==0.1.3,musdb== 0.2.3 . I just build a environment with python==2.7.11 in Anaconda3.

xdzhangxuejun commented 5 years ago

I should install Anaconda2?

f90 commented 5 years ago

I am not familiar with Anaconda so I don't know exactly what you need, it just looked suspicious? Also I have stempeg 0.1.4, maybe try that too

xdzhangxuejun commented 5 years ago

I found that function Popen(subprocess.py) didn't work. I don't know how fix it.

xdzhangxuejun commented 5 years ago

Hi、I fix it. Because of the program didn't find "ffprobe" command. So、I install "FFMPEG"(http://www.ffmpeg.org/download.html), it work well.

xdzhangxuejun commented 5 years ago

Thank you very much! Thank you for your help!