Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

failed to load BF in 1.0-segment-song-from-wavs.ipynb #12

Open
robinmeier opened this issue Jan 30, 2020 · 7 comments
Open

failed to load BF in 1.0-segment-song-from-wavs.ipynb #12

robinmeier opened this issue Jan 30, 2020 · 7 comments

Comments

@robinmeier
Copy link

when running 1.0-segment-song-from-wavs.ipynb i get errors during the last step:

100% 135/135 [00:00<00:00, 3939.66it/s]
failed to load BF
failed to load BF
failed to load BF
...

all the rest seems to be working. not sure what i'm missing. the wav count and folder structure in */data/ is correct.

@robinmeier
Copy link
Author

fwiw, 13.0-koumura-bengalese-finch-custom-parsing.ipynb in the avgn_paper repo is working for me and generates the json files.

@timsainb
Copy link
Owner

Hi @robinmeier

Sorry for the slow reply. Could you try removing the exception that prints "failed to load BF" and see where the error is occuring in the code? To play with the code you should try installing with python setup.py develop instead of python setup.py install.

@robinmeier
Copy link
Author

robinmeier commented Feb 12, 2020

hi @timsainb
thanks for getting back to me. here's the error message with the exception removed:

---------------------------------------------------------------------------
FileNotFoundError                         Traceback (most recent call last)
<ipython-input-19-4c5973a5575d> in <module>
     27             for idx, gbird, gdset, filename, wav_time in tqdm(group.itertuples(), total=len(group)):
     28                 process_bird_wav(bird, filename, wav_time, param_dict[dset],save_to_folder, visualize=visualize,
---> 29                                  skip_created=skip_created, save_spectrograms= save_spectrograms, verbose=verbose) 
     30 except KeyboardInterrupt:
     31     print('interrrupted')

~/Dropbox/AVGN/avgn/segment_song/preprocessing.py in process_bird_wav(bird, wav_info, wav_time, params, save_to_folder, visualize, skip_created, seconds_timeout, save_spectrograms, verbose)
    123         # Load up the WAV
    124 #        try:
--> 125         rate, data = wavfile.read(wav_info)
    126 #        except:
    127 #            print('failed to load %s' % (wav_info))

/anaconda3/lib/python3.7/site-packages/scipy/io/wavfile.py in read(filename, mmap)
    262         mmap = False
    263     else:
--> 264         fid = open(filename, 'rb')
    265 
    266     try:

FileNotFoundError: [Errno 2] No such file or directory: 'BF'

@timsainb
Copy link
Owner

Hi Robin,

That error message is saying that the directory /BF/ does not exist, so whatever path is supposed to be pointed at the wav files is pointed somewhere else.

Are you using windows? It's possible that this code doesn't work with windows file structure. You'd need change the file path to point at the actual location of the WAV files to get this to work then.

@robinmeier
Copy link
Author

i'm not sure BF is supposed to be a directory. it's declared here:
dsets = [(input_loc+'Bird*/Wave/*.wav', 'BF')]
am running on osx and changed the path to the wav files of the dataset here:
input_loc = '/Volumes/1TSSD/bird_datasets/3470165/'

@timsainb
Copy link
Owner

Yes, I'm not 100% sure what the problem here is without having access to your filesystem and the code. If the data is correctly downloaded to '/Volumes/1TSSD/bird_datasets/3470165/Bird*/Wave/*.wav' then it should be seeing that data. It might be worth trying the other repository which has examples with the same dataset if you continue to have trouble finding the correct files:
https://github.com/timsainb/AVGN_paper

@Aegean-Sea
Copy link

when running 1.0-segment-song-from-wavs.ipynb i get errors during the last step:

100% 135/135 [00:00<00:00, 3939.66it/s]
failed to load BF
failed to load BF
failed to load BF
...

all the rest seems to be working. not sure what i'm missing. the wav count and folder structure in */data/ is correct.

Hi robinmeier,

Did you solve this problem? I have the same issue. Could you please teach me how did you solve that?

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants