Opened 12 years ago
Closed 12 years ago
#674 closed defect (wontfix)
Celery should not fail if audiolab is not installed
Reported by: | Simon Fondrie-Teitler | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | programming | Keywords: | bitesized, audiolab, celery, audio |
Cc: | Parent Tickets: |
Description
The docs say that audiolab is for spectrograms. I don't think this should be a critical feature for audio uploading and transcoding to work. It is possible that I'm missing something and audiolab is more important than I thought though. When I upload a flac file without audiolab installed I get the following error:
2013-04-03 22:11:30,136 ERROR [celery] Task mediagoblin.processing.task.ProcessMedia[c1ac8460-95b5-44bc-bc5d-f02a9204be1b] raised exception: NameError("global name 'audiolab' is not defined",) Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/celery/execute/trace.py", line 181, in trace_task R = retval = fun(*args, **kwargs) File "/usr/share/mediagoblin/mediagoblin/processing/task.py", line 92, in run entry.media_manager['processor'](proc_state) File "/usr/share/mediagoblin/mediagoblin/media_types/audio/processing.py", line 122, in process_audio fft_size=audio_config['spectrogram_fft_size']) File "/usr/share/mediagoblin/mediagoblin/media_types/audio/transcoders.py", line 76, in spectrogram numpy.hanning) File "/usr/share/mediagoblin/mediagoblin/media_types/audio/audioprocessing.py", line 109, in __init__ max_level = get_max_level(input_filename) File "/usr/share/mediagoblin/mediagoblin/media_types/audio/audioprocessing.py", line 79, in get_max_level audio_file = audiolab.Sndfile(filename, 'r') NameError: global name 'audiolab' is not defined
I think it makes sense for celery to fail if audiolab is not enabled here, since audiolab is a requirement of this media type. We could "not require" audiolab, but our entire method of displaying audio presently expects it..
What maybe would be a more useful thing is to have media types fail with a more useful method if they see that they are being enabled without all the dependencies they need. I'd be open to that, but I think that's a different bug, so if you're interested in that, I think we should file that separately.