google-code-export / beets

Automatically exported from code.google.com/p/beets
MIT License
0 stars 0 forks source link

error: int() argument must be a string or a number, not a nonetype #513

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
This error occurs when i try to run an import.

Im runing beets on Ubuntu 10.04 using the chromaprint plugin and python version 
2.6.5

Original issue reported on code.google.com by ChrisBru...@gmail.com on 31 Jan 2013 at 3:18

GoogleCodeExporter commented 9 years ago
Please include a traceback.

Original comment by adrian.sampson on 31 Jan 2013 at 4:07

GoogleCodeExporter commented 9 years ago
Closing ticket pending more information from the OP.

Original comment by adrian.sampson on 3 Feb 2013 at 8:35

GoogleCodeExporter commented 9 years ago
Hello,

Sorry it took me so long to produce a traceback but, as always, after posting 
the issue the program worked with no problems.  I recently came back to it to 
run another scan and the problem came back.  This time i did get the traceback 
info.

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

Hope it helps.

Thanks,
Chris.

Original comment by ChrisBru...@gmail.com on 27 Mar 2013 at 12:01

GoogleCodeExporter commented 9 years ago
Thanks for following up! The problem actually exists in the pyacoustid library 
(which powers the Chromaprint/Acoustid beets plugin) rather than beets itself.

Do you know whether you are using the "fpcalc" command-line tool or the 
Chromaprint library to do fingerprinting?

Original comment by adrian.sampson on 27 Mar 2013 at 1:36

GoogleCodeExporter commented 9 years ago
I seem to have both installed but I think I'm using Chromaprint.  I have 
"chroma" listed as a plugin anyway.  

Original comment by ChrisBru...@gmail.com on 27 Mar 2013 at 8:41

GoogleCodeExporter commented 9 years ago
Thanks. I'll dig into how this could be happening.

Original comment by adrian.sampson on 27 Mar 2013 at 4:03

GoogleCodeExporter commented 9 years ago
The bug is actually in the audioread library. See this issue on GitHub: 
https://github.com/sampsyo/audioread/issues/6

Original comment by adrian.sampson on 27 Mar 2013 at 4:06

GoogleCodeExporter commented 9 years ago
Thanks for the link.

Hmmm, no fix so far... but it is only 6 hours old!  

Is there anything you could suggest to get around the problem?  I guess i could 
turn the chroma functionality off but i think its a really cool feature.  Is 
there an alternative i could use?  Or hang on for a fix?

Thanks for your help.

Original comment by ChrisBru...@gmail.com on 27 Mar 2013 at 10:12

GoogleCodeExporter commented 9 years ago
Yes, turning off chroma will work -- and I think you'll be surprised at how 
accurate (and fast!) beets' metadata-based matcher can be.

I think you should also be able to get around this by uninstalling the 
Chromaprint library and instead letting beets fall back on the fpcalc utility 
that serves the same purpose.

Original comment by adrian.sampson on 27 Mar 2013 at 10:30

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
OK, so I think I managed to uninstall chromaprint and followed the instructions 
on the beets site to use fpcalc (download the static binary, move it to 
/usr/local/bin, install a bunch of gstreamer stuff...).  

I'm then got an error about Permissions on fpcalc but I made it executable and 
now it doesn't seem to be having any problems.

I started another import and its smooth sailing so far!
Thanks for your help.

Original comment by ChrisBru...@gmail.com on 28 Mar 2013 at 12:11

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I may have spoken too soon.

Now I'm getting lots of "[mp3 @ 0xa3c39a0] Header missing" and "incomplete 
frame" warnings.  They don't look good, judging by the red font.

Have I not installed fpcalc correctly?

Original comment by ChrisBru...@gmail.com on 28 Mar 2013 at 12:45

GoogleCodeExporter commented 9 years ago
No, you have it installed right. Those error messages are coming from fpcalc 
when FFmpeg detects problems in the files it's trying to read.

More recent versions of pyacoustid silence this output. You can upgrade with 
"pip install -U pyacoustid".

Original comment by adrian.sampson on 28 Mar 2013 at 12:47

GoogleCodeExporter commented 9 years ago
Excellent.  "pip install -U pyacoutid" worked fine and beets is working as it 
should.

Unfortunately Im now getting "bus error" after a few minutes but, correct me if 
im wrong, that is a much bigger problem, possibly a hard drive issue.  Not good 
:(

Thanks for helping me sort beets out.
Cheers.

Original comment by ChrisBru...@gmail.com on 31 Mar 2013 at 10:53