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

ipfs: Crash when adding to library #2555

Open
musoke opened this issue May 11, 2017 · 0 comments
Open

ipfs: Crash when adding to library #2555

musoke opened this issue May 11, 2017 · 0 comments
Labels
bug bugs that are confirmed and actionable

Comments

@musoke
Copy link
Contributor

musoke commented May 11, 2017

Problem

Running this command in verbose (-vv) mode:

$ beet -vv ipfs -g QmWZLpxqkcH6wwD1ZnpbhpSy6jhGZub42Vv24sh9rNPXFi

Led to this problem:

user configuration: /home/user/.config/beets/config.yaml
data directory: /home/user/.config/beets
plugin paths: 
Sending event: pluginload
library database: /home/user/media/music/musiclibrary.blb
library directory: /home/user/media/music
Sending event: library_opened
ipfs: Getting QmWZLpxqkcH6wwD1ZnpbhpSy6jhGZub42Vv24sh9rNPXFi from ipfs
Sending event: import_begin
No files imported from /home/user/src/beets/QmWZLpxqkcH6wwD1ZnpbhpSy6jhGZub42Vv24sh9rNPXFi
Traceback (most recent call last):
  File "/home/user/.local/bin/beet", line 11, in <module>
    sys.exit(main())
  File "/home/user/.local/lib/python2.7/site-packages/beets/ui/__init__.py", line 1209, in main
    _raw_main(args)
  File "/home/user/.local/lib/python2.7/site-packages/beets/ui/__init__.py", line 1196, in _raw_main
    subcommand.func(lib, suboptions, subargs)
  File "/home/user/.local/lib/python2.7/site-packages/beetsplug/ipfs.py", line 73, in func
    self.ipfs_get(lib, ui.decargs(args))
  File "/home/user/.local/lib/python2.7/site-packages/beetsplug/ipfs.py", line 151, in ipfs_get
    self.ipfs_get_from_hash(lib, query)
  File "/home/user/.local/lib/python2.7/site-packages/beetsplug/ipfs.py", line 171, in ipfs_get_from_hash
    shutil.rmtree(_hash)
  File "/usr/lib/python2.7/shutil.py", line 239, in rmtree
    onerror(os.listdir, path, sys.exc_info())
  File "/usr/lib/python2.7/shutil.py", line 237, in rmtree
    names = os.listdir(path)
OSError: [Errno 20] Not a directory: 'QmWZLpxqkcH6wwD1ZnpbhpSy6jhGZub42Vv24sh9rNPXFi'

Setup

I tried a few combinations:

  • OS: Linux
  • Python version: 2.7.12
  • beets version: v1.4.3
  • Turning off plugins made problem go away (yes/no): no

&

  • OS: Linux
  • Python version: 2.7.12
  • beets version: ca8c557
  • Turning off plugins made problem go away (yes/no): no

&

  • OS: Linux
  • Python version: 3.5.2
  • beets version: ca8c557
  • Turning off plugins made problem go away (yes/no): no

My configuration (output of beet config) is:

paths:
    default: $albumartist/$album%aunique{}/$track $title
    singleton: Non-Album/$artist/$title
    comp: Compilations/$album%aunique{}/$track $title
    albumtype:soundtrack: Soundtracks/$album/$track $title
asciify_paths: yes
fetchart:
    store_source: yes
    auto: yes
    minwidth: 0
    sources:
    - filesystem
    - coverart
    - itunes
    - amazon
    - albumart
    google_engine: 001442825323518660753:hrh5ch1gjzm
    enforce_ratio: no
    cautious: no
    maxwidth: 0
    google_key: REDACTED
    fanarttv_key: REDACTED
    cover_names:
    - cover
    - front
    - art
    - album
    - folder
library: ~/media/music/musiclibrary.blb

replace:
    '[\\/]': _
    ^\.: _
    '[\x00-\x1f]': _
    '[<>:"\?\*\|]': _
    \.$: _
    \s+$: ''
    ^\s+: ''
    \s: '-'

plugins: 'fromfilename fetchart mbsync ipfs

    '
directory: ~/media/music

import:
    move: yes
    write: yes
    languages: en
    log: ~/media/music/beets-log.txt

match:
    preferred:
        media: [CD]
ipfs:
    auto: yes
@sampsyo sampsyo added the bug bugs that are confirmed and actionable label May 11, 2017
@sampsyo sampsyo changed the title IPFS plugin crashes when adding to library ipfs: Crash when adding to library May 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug bugs that are confirmed and actionable
Projects
None yet
Development

No branches or pull requests

2 participants