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

Traceback during scan #6

Closed
mdboom opened this issue Oct 22, 2013 · 0 comments
Closed

Traceback during scan #6

mdboom opened this issue Oct 22, 2013 · 0 comments
Labels

Comments

@mdboom
Copy link

mdboom commented Oct 22, 2013

Traceback (most recent call last):
  File "/usr/lib/python2.7/pdb.py", line 1314, in main
    pdb._runscript(mainpyfile)
  File "/usr/lib/python2.7/pdb.py", line 1233, in _runscript
    self.run(statement)
  File "/usr/lib/python2.7/bdb.py", line 400, in run
    exec cmd in globals, locals
  File "<string>", line 1, in <module>
  File "cli.py", line 3, in <module>
    import sys, cmd, argparse, getpass
  File "/usr/lib/python2.7/cmd.py", line 142, in cmdloop
    stop = self.onecmd(line)
  File "/usr/lib/python2.7/cmd.py", line 221, in onecmd
    return func(arg)
  File "cli.py", line 27, in method
    return func(** { key: vars(args)[key] for key in vars(args) if key != 'action' })
  File "cli.py", line 110, in folder_scan
    FolderManager.scan(folder.id, s)
  File "managers/folder.py", line 94, in scan
    scanner.scan(folder)
  File "scanner.py", line 28, in scan
    self.__scan_file(os.path.join(root, f), folder)
  File "scanner.py", line 77, in __scan_file
    tr.album    = self.__find_album(self.__try_read_tag(tag, 'artist'), self.__try_read_tag(tag, 'album'))
  File "scanner.py", line 83, in __find_album
    ar = self.__find_artist(artist)
  File "scanner.py", line 94, in __find_artist
    ar = filter(lambda a: a.name.lower() == artist.lower(), self.__artists)
  File "scanner.py", line 94, in <lambda>
    ar = filter(lambda a: a.name.lower() == artist.lower(), self.__artists)
AttributeError: 'NoneType' object has no attribute 'lower'

This happens because artist is None in this context, because back in __scan_file, self.__try_read_tag(tag, 'artist') returns None. (I guess I have a broken MP3 file without an artist tag...) Adding a default, i.e. changing to self.__try_read_tag(tag, 'artist', '') seems to help, but I don't know what the right solution is.

BTW: I'm really psyched to have found something I can run on my Sheevaplug that doesn't require something as heavy as Java!

@spl0k spl0k closed this as completed in dfc0621 Nov 2, 2013
ezpuzz pushed a commit to ezpuzz/supysonic that referenced this issue Nov 3, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant