beetbox / beetbox/beets

move: Don't stop when one file can't be moved

Open
#1,926 11 comments 3 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
15.7k
Forks
2.1k
Avg merge
4d 21h
Merged PRs (30d)
31

Description

### Problem

```
moving: /home/moorepants/Music/Bob Dylan/Greatest Hits 115/01 Rainy Day Women #12 & 35.m4a
Sending event: before_item_moved
Traceback (most recent call last):
File "/usr/share/beets/beets/util/__init__.py", line 445, in move
shutil.copyfile(path, dest)
File "/usr/lib/python2.7/shutil.py", line 82, in copyfile
with open(src, 'rb') as fsrc:
IOError: [Errno 2] No such file or directory: '/home/moorepants/Music/Bob Dylan/Greatest Hits 115/01 Rainy Day Women #12 & 35.m4a'

Error: No such file or directory while moving /home/moorepants/Music/Bob Dylan/Greatest Hits 115/01 Rainy Day Women #12 & 35.m4a to /home/moorepants/Music/Bob Dylan/Greatest Hits/01 Rainy Day Women #12 & 35.m4a
```

Running this command in verbose (`-vv`) mode:

``` sh
moorepants@parvati:~$ beet -vv
user configuration: /home/moorepants/.config/beets/config.yaml
data directory: /home/moorepants/.config/beets
Sending event: pluginload
no config file found at /home/moorepants/.beetsconfig
library database: /home/moorepants/Music/beets-library.db
library directory: /home/moorepants/Music
Sending event: library_opened
Usage:
beet COMMAND [ARGS...]
beet help COMMAND

Options:
-l LIBRARY, --library=LIBRARY
library database file to use
-d DIRECTORY, --directory=DIRECTORY
destination music directory
-v, --verbose print debugging information
-c CONFIG, --config=CONFIG
path to configuration file
-h, --help how this help message and exit

Commands:
config show or edit the user configuration
fetchart download album art
fields show fields available for queries and format strings
fingerprint generate fingerprints for items without them
help (?) give detailed help on a specific sub-command
import (imp, im) import new music
lastgenre fetch genres
list (ls) query the library
migrate convert legacy config
modify (mod) change metadata fields
move (mv) move or copy items
remove (rm) remove matching items from the library
stats show statistics about the library or a query
submit submit Acoustid fingerprints
update (upd, up) update the library
version output version information
write write tag information to files
Sending event: cli_exit
```

Led to this problem:

```
(paste here)
```

Here's a link to the music files that trigger the bug (if relevant):
### Setup
- OS: Ubuntu 15.10
- Python version: 2.7.10
- beets version: 1.3.8
- Turning off plugins made problem go away (yes/no):

My configuration (output of `beet config`) is:

``` yaml
moorepants@parvati:~$ beet config
directory: ~/Music

import:
copy: no
write: no
library: ~/Music/beets-library.db

plugins: chroma fetchart lastgenre fromfilename
fetchart:
cautious: no
maxwidth: 0
auto: yes
remote_priority: no
google_search: no
cover_names:
- cover
- front
- art
- album
- folder
chroma:
auto: yes
lastgenre:
count: 1
source: album
force: yes
min_weight: 10
auto: yes
whitelist: yes
separator: ', '
fallback:
canonical: no
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.