beetbox / beets

music library manager and MusicBrainz tagger
http://beets.io/
MIT License
12.92k stars 1.82k forks source link

beets crashing when importing; message error about pyacoustid #258

Closed Bercio closed 11 years ago

Bercio commented 11 years ago

As stated in the title, beet import crashes, no matter what i give it, and the error is:

Traceback (most recent call last):                                                                                                                                                                
  File "/usr/bin/beet", line 9, in <module>                                                                                                                                                       
    load_entry_point('beets==1.1.0-beta.3', 'console_scripts', 'beet')()                                                                                                                          
  File "/usr/lib/python2.7/site-packages/beets/ui/__init__.py", line 771, in main                                                                                                                 
    _raw_main(args)                                                                                                                                                                               
  File "/usr/lib/python2.7/site-packages/beets/ui/__init__.py", line 763, in _raw_main                                                                                                            
    subcommand.func(lib, suboptions, subargs)                                                                                                                                                     
  File "/usr/lib/python2.7/site-packages/beets/ui/commands.py", line 737, in import_func                                                                                                          
    import_files(lib, paths, query)                                                                                                                                                               
  File "/usr/lib/python2.7/site-packages/beets/ui/commands.py", line 675, in import_files                                                                                                         
    session.run()                                                                                                                                                                                 
  File "/usr/lib/python2.7/site-packages/beets/importer.py", line 337, in run                                                                                                                     
    pl.run_parallel(QUEUE_SIZE)                                                                                                                                                                   
  File "/usr/lib/python2.7/site-packages/beets/util/pipeline.py", line 243, in run                                                                                                                
    out = self.coro.send(msg)                                                                                                                                                                     
  File "/usr/lib/python2.7/site-packages/beets/importer.py", line 642, in initial_lookup                                                                                                          
    plugins.send('import_task_start', session=session, task=task)                                                                                                                                 
  File "/usr/lib/python2.7/site-packages/beets/plugins.py", line 331, in send                                                                                                                     
    handler(**arguments)                                                                                                                                                                          
  File "/usr/lib/python2.7/site-packages/beetsplug/chroma.py", line 181, in fingerprint_task                                                                                                      
    acoustid_match(item.path)                                                                                                                                                                     
  File "/usr/lib/python2.7/site-packages/beetsplug/chroma.py", line 62, in acoustid_match                                                                                                         
    meta='recordings releases')                                                                                                                                                                   
  File "/usr/lib/python2.7/site-packages/acoustid.py", line 215, in lookup                                                                                                                        
    'duration': int(duration),
TypeError: int() argument must be a string or a number, not 'NoneType'
sampsyo commented 11 years ago

Thanks for the report. Do you know which versions of audioread and pyacousid you're using? You can typically chech by typing "pip freeze" and looking for the relevant lines.

Also, do you have Gstreamer installed?

sampsyo commented 11 years ago

Additionally: To get around this for now, you can disable the chroma plugin, which is where the crash is occurring.

Bercio commented 11 years ago

audioread 1.0.0. I have gstreamer whith the base, ffmpeg and ugly plugins. the files i tried to import are .flac and mp3

sampsyo commented 11 years ago

Thanks! I've added a fix in audioread (see above commit). Can you install audioread from source and let me know whether this fixes the crash for you?

Bercio commented 11 years ago

ahah thank you, it works ! Tiptop support ; D

sampsyo commented 11 years ago

Great! :sparkles: Audioread 1.0.1 will go out at the same time as beets 1.1.0.