beets icon indicating copy to clipboard operation
beets copied to clipboard

[Issue] Database or disk is full error. Beets creates new files ?

Open Rlyeth opened this issue 10 years ago • 10 comments

I get a "database or disk is full" error using beet import on a 50GB music folder. It works at first then my system partition gets full and I get the error. Beet and my OS are running on a small 10GB partition on my Raspberry Pi nanoSD, while both the folder to import and the configured music directory are on an external HDD with plenty of empty space.

I tried to move the library.db to the external HDD but I get the same issue.

Does Beet create files other than library.db which could have fill up my entire partition ?

The error message below (from the terminal) after typing

sudo beet import /media/data/musictemp

Enter search, enter Id, aBort?
Enter one of A, M, S, U, T, G, E, I, B: a
Traceback (most recent call last):
  File "/usr/local/bin/beet", line 9, in <module>
    load_entry_point('beets==1.3.17', 'console_scripts', 'beet')()
  File "/usr/local/lib/python2.7/dist-packages/beets/ui/__init__.py", line 1236, in main
    _raw_main(args)
  File "/usr/local/lib/python2.7/dist-packages/beets/ui/__init__.py", line 1226, in _raw_main
    subcommand.func(lib, suboptions, subargs)
  File "/usr/local/lib/python2.7/dist-packages/beets/ui/commands.py", line 966, in import_func
    import_files(lib, paths, query)
  File "/usr/local/lib/python2.7/dist-packages/beets/ui/commands.py", line 943, in import_files
    session.run()
  File "/usr/local/lib/python2.7/dist-packages/beets/importer.py", line 321, in run
    pl.run_parallel(QUEUE_SIZE)
  File "/usr/local/lib/python2.7/dist-packages/beets/util/pipeline.py", line 302, in run
    out = self.coro.send(msg)
  File "/usr/local/lib/python2.7/dist-packages/beets/util/pipeline.py", line 161, in coro
    task = func(*(args + (task,)))
  File "/usr/local/lib/python2.7/dist-packages/beets/importer.py", line 1317, in user_query
    apply_choice(session, task)
  File "/usr/local/lib/python2.7/dist-packages/beets/importer.py", line 1362, in apply_choice
    task.add(session.lib)
  File "/usr/local/lib/python2.7/dist-packages/beets/importer.py", line 697, in add
    self.remove_replaced(lib)
  File "/usr/local/lib/python2.7/dist-packages/beets/importer.py", line 772, in remove_replaced
    dup_item.remove()
  File "/usr/local/lib/python2.7/dist-packages/beets/library.py", line 706, in remove
    super(Item, self).remove()
  File "/usr/local/lib/python2.7/dist-packages/beets/library.py", line 319, in remove
    super(LibModel, self).remove()
  File "/usr/local/lib/python2.7/dist-packages/beets/dbcore/db.py", line 406, in remove
    (self.id,)
  File "/usr/local/lib/python2.7/dist-packages/beets/dbcore/db.py", line 671, in mutate
    cursor = self.db._connection().execute(statement, subvals)
sqlite3.OperationalError: database or disk is full
osmc@osmc:~$

Setup

  • OS: OSMC
  • Python version: 2.7
  • beets version: master
  • Turning off plugins made problem go away (yes/no): no

My configuration (output of beet config) is:

GNU nano 2.2.6               File: config.yaml                                    
directory: /media/data/Musique
library: /media/data/Musique/library.db
plugins: fetchart lyrics lastgenre thumbnails discogs embedart
import_incremental: yes
import_quiet: yes
import_log: /home/osmc/.config/beets/log.txt                                        dlibrary: /media/data/Musique/library.db



plugins: fetchart lyrics lastgenre thumbnails discogs embedart
import_incremental: yes
import_quiet: yes
import_log: /home/osmc/.config/beets/log.txt

Rlyeth avatar Mar 04 '16 23:03 Rlyeth

Could you perhaps look into the situation on your disk to see if there are large files you didn't expect? That could help give insight into what's going on.

Also, it looks like the formatting on your config got messed up. But it appears that you're using config keys like import_quiet, which isn't right; you'll want to make that a quiet key under an import: section.

sampsyo avatar Mar 05 '16 00:03 sampsyo

Thank you for your help.

I looked for the biggest directories and found that my music was also copied to /root/Music, probably during the import process. Is it normal and can I prevent it ? (I am rlyeth, other account, sorry for the mess).

jeromebruzaud avatar Mar 07 '16 20:03 jeromebruzaud

Huh, that definitely shouldn't happen.

Can you please look at (and probably paste) your config again, this time from the output of beet config? I'm concerned something is disconnected between what you're trying to configure and what beets is actually seeing.

sampsyo avatar Mar 07 '16 20:03 sampsyo

I tried to import again and found an interresting message during the process :

could not get filesize: [Errno 2] No such file or directory: '/root/Music/Non-Album/Annihilator/Alison Hell (remastered version).mp3'

Here is more of the terminal log with the previous steps:

osmc@osmc:/$ sudo beet import /media/data/musictemp
Import of the directory:
/media/data/musictemp
was interrupted. Resume (Y/n)? y
Resuming interrupted import of /media/data/musictemp
^N
/media/data/musictemp/ACDC & Alison Hell (12 items)
Finding tags for album "AC/DC - The Very Best".
Candidates:
1. AC/DC - 12 of the Best (55.7%) (tracks, album, year) (Cassette, 1978, AU)
2. AC/DC - The Razors Edge (46.6%) (tracks, album, year) (CD, 2008, JP, Albert Productions)
3. AC/DC - The Razors Edge (46.1%) (tracks, album, year) (CD, 1990, JP, Albert Productions)
4. AC/DC - The Razors Edge (46.1%) (tracks, album, year) (CD, 1990, CA, Albert Productions)
5. AC/DC - The Razors Edge (46.1%) (tracks, album, year) (CD, 1990, US, ATCO Records)
6. Various Artists - The Very Best of Chinese Music (36.0%) (tracks, album, year) (CD, 1999, GB, ARC Music)
7. Various Artists - The Very Best of Christmas (34.1%) (tracks, album, year) (CD, 1997, US, LaserLight Digital)
8. Various Artists - The Very Best of Smooth Jazz Guitar (31.4%) (tracks, album, year) (1998, US)
9. Various Artists - The Very Best of British Punk (25.7%) (tracks, album) (CD)
10. Various Artists - The Very Best of Rock (24.7%) (tracks, album) (CD, DK, The Very Best of Music)
# selection (default 1), Skip, Use as-is, as Tracks, Group albums,
Enter search, enter Id, aBort? t
Enter one of 1-10, S, U, T, G, E, I, B: t

/media/data/musictemp/ACDC & Alison Hell/0. alison hell (remastered versio.mp3
Correcting track tags from:
    Annihilator - Alison Hell [Remastered Version]
To:
    Annihilator - Alison Hell (remastered version)
URL:
    http://musicbrainz.org/recording/e0f12b69-e6c0-4719-b1a8-e03e704549bf
(Similarity: 100.0%)
This item is already in the library!
could not get filesize: [Errno 2] No such file or directory: '/root/Music/Non-Album/Annihilator/Alison Hell (remastered version).mp3'
Old: MP3, 209kbps, 5:02, 0.0 B
New: MP3, 209kbps, 5:02, 7.6 MiB
[S]kip new, Keep both, Remove old?

jeromebruzaud avatar Mar 07 '16 21:03 jeromebruzaud

This is the configuration file:

directory: /media/data/Musique
library: /media/data/Musique/library.db
plugins: fetchart lyrics lastgenre thumbnails discogs embedart
import_incremental: yes                                                             import_log: /home/osmc/.config/beets/log.txt
threaded: yes

Note that /media/data is an external HDD. Maybe something Wrong with that ?

jeromebruzaud avatar Mar 07 '16 21:03 jeromebruzaud

Hmm, again, it looks like something's wrong with the formatting. Why are there two options on one line, separated by a bunch of whitespace? (Did you see my note above about the import: section?)

Could you please also include the verbose output from a run that puts stuff in the wrong directory?

sampsyo avatar Mar 07 '16 21:03 sampsyo

Ok sorry about the config file, I edited it and there it is

osmc@osmc:~$ beet config
directory: /media/data/Musique

import:
    incremental: yes
    log: /home/osmc/.config/beets/log.txt
library: /media/data/Musique/library.db

Then I ran an import with verbale, here is the log :

osmc@osmc:~$ sudo beet -v import /media/data/musictemp
no user configuration found at /root/.config/beets/config.yaml
data directory: /root/.config/beets
plugin paths:
Sending event: pluginload
library database: /root/.config/beets/library.db
library directory: /root/Music
Sending event: library_opened
Sending event: import_begin
Sending event: import_task_created
Sending event: import_task_start
Looking up: /media/data/musictemp/ACDC & Alison Hell
Tagging AC/DC - The Very Best
No album IDs found.
Search terms: AC/DC - The Very Best
Album might be VA: True
Sending event: import_task_created
Sending event: import_task_created
Sending event: import_task_created
Sending event: import_task_created
Sending event: import_task_created
Sending event: import_task_created
Sending event: albuminfo_received
Sending event: albuminfo_received
Sending event: albuminfo_received
Sending event: albuminfo_received
Sending event: albuminfo_received
Sending event: albuminfo_received
Sending event: albuminfo_received
Sending event: albuminfo_received
Sending event: albuminfo_received
Sending event: albuminfo_received
Evaluating 10 candidates.
Candidate: AC/DC - 12 of the Best
Success. Distance: 0.44
Candidate: AC/DC - The Razors Edge
Sending event: import_task_created
Success. Distance: 0.54
Candidate: AC/DC - The Razors Edge
Success. Distance: 0.53
Candidate: AC/DC - The Razors Edge
Success. Distance: 0.54
Candidate: AC/DC - The Razors Edge
Success. Distance: 0.54
Candidate: Various Artists - The Very Best of Rock
Success. Distance: 0.75
Candidate: Various Artists - The Very Best of Christmas
Success. Distance: 0.66
Candidate: Various Artists - The Very Best of Smooth Jazz Guitar
Success. Distance: 0.69
Candidate: Various Artists - The Very Best of British Punk
Success. Distance: 0.74
Candidate: Various Artists - The Very Best of Chinese Music
Success. Distance: 0.64

/media/data/musictemp/ACDC & Alison Hell (12 items)
Sending event: before_choose_candidate
Finding tags for album "AC/DC - The Very Best".
Sending event: import_task_start
Looking up: /media/data/musictemp/Alfred Brendel - Beethoven- Favourite Piano Sonatas [Disc 1]
Tagging Alfred Brendel - Beethoven: Favourite Piano Sonatas [Disc 1]
Candidates:
1. AC/DC - 12 of the Best (55.7%) (tracks, album, year) (Cassette, 1978, AU)
No album IDs found.
2. AC/DC - The Razors Edge (46.6%) (tracks, album, year) (CD, 2008, JP, Albert Productions)
3. AC/DC - The Razors Edge (46.1%) (tracks, album, year) (CD, 1990, CA, Albert Productions)
Search terms: Alfred Brendel - Beethoven: Favourite Piano Sonatas [Disc 1]
4. AC/DC - The Razors Edge (46.1%) (tracks, album, year) (CD, 1990, JP, Albert Productions)
Album might be VA: False
5. AC/DC - The Razors Edge (46.1%) (tracks, album, year) (CD, 1990, US, ATCO Records)
6. Various Artists - The Very Best of Chinese Music (36.0%) (tracks, album, year) (CD, 1999, GB, ARC Music)
7. Various Artists - The Very Best of Christmas (34.1%) (tracks, album, year) (CD, 1997, US, LaserLight Digital)
8. Various Artists - The Very Best of Smooth Jazz Guitar (31.4%) (tracks, album, year) (1998, US)
9. Various Artists - The Very Best of British Punk (25.7%) (tracks, album) (CD)
10. Various Artists - The Very Best of Rock (24.7%) (tracks, album) (CD, DK, The Very Best of Music)
# selection (default 1), Skip, Use as-is, as Tracks, Group albums,
Enter search, enter Id, aBort? Sending event: import_task_created
Sending event: import_task_created
t
Sending event: import_task_choice
Sending event: import_task_created
Sending event: import_task_start
Looking up: /media/data/musictemp/ACDC & Alison Hell/0. alison hell (remastered versio.mp3
Item search terms: Annihilator - Alison Hell [Remastered Version]
Sending event: trackinfo_received
Sending event: trackinfo_received
Sending event: trackinfo_received
Sending event: trackinfo_received
Sending event: trackinfo_received
Found 5 candidates.

/media/data/musictemp/ACDC & Alison Hell/0. alison hell (remastered versio.mp3
Sending event: before_choose_candidate
Correcting track tags from:
    Annihilator - Alison Hell [Remastered Version]
To:
    Annihilator - Alison Hell (remastered version)
URL:
    http://musicbrainz.org/recording/e0f12b69-e6c0-4719-b1a8-e03e704549bf
(Similarity: 100.0%)
Sending event: import_task_choice
found duplicates: [1]
This item is already in the library!
could not get filesize: [Errno 2] No such file or directory: '/root/Music/Non-Album/Annihilator/Alison Hell (remastered version).mp3'
Old: MP3, 209kbps, 5:02, 0.0 B
New: MP3, 209kbps, 5:02, 7.6 MiB
[S]kip new, Keep both, Remove old? Sending event: albuminfo_received
Sending event: albuminfo_received
Sending event: albuminfo_received
Sending event: albuminfo_received
Sending event: albuminfo_received
Evaluating 5 candidates.
Candidate: Ludwig van Beethoven; Alfred Brendel - Piano Sonatas Nos. 8-11
Success. Distance: 0.52
Candidate: Ludwig van Beethoven; Alfred Brendel - Piano Sonatas Nos. 8-11
Success. Distance: 0.52
Candidate: Ludwig van Beethoven; Alfred Brendel - Piano Sonatas Nos. 12-14, 19
Success. Distance: 0.58
Candidate: Ludwig van Beethoven; Alfred Brendel - Favourite Piano Sonatas
Success. Distance: 0.36
Candidate: Ludwig van Beethoven; Alfred Brendel - Alfred Brendel plays Beethoven Piano Sonatas (disc 2)
Success. Distance: 0.60
Sending event: import_task_start
Looking up: /media/data/musictemp/Arcade Fire/Funeral
Tagging The Arcade Fire - Funeral
No album IDs found.
Search terms: The Arcade Fire - Funeral
Album might be VA: False
rSending event: import_task_created
Sending event: import_task_created
Sending event: import_task_created
Sending event: albuminfo_received
Sending event: albuminfo_received
Sending event: albuminfo_received
Sending event: albuminfo_received
Sending event: albuminfo_received
Evaluating 5 candidates.
Candidate: Arcade Fire - Funeral
Success. Distance: 0.15
Candidate: Arcade Fire - Funeral
Success. Distance: 0.17
Candidate: Arcade Fire - Funeral
Success. Distance: 0.15
Sending event: import_task_created
Candidate: Arcade Fire - Funeral
Success. Distance: 0.15
Candidate: Arcade Fire - Funeral
Success. Distance: 0.16
Sending event: import_task_start
Looking up: /media/data/musictemp/Arcade Fire/Neon Bible
Tagging Arcade Fire - Neon Bible
No album IDs found.
Search terms: Arcade Fire - Neon Bible
Album might be VA: False
Sending event: import_task_created
rSending event: import_task_created

Sending event: import_task_apply
0 of 1 items replaced
Sending event: database_change
Sending event: database_change
Sending event: import_task_created
Sending event: import_task_start
Looking up: /media/data/musictemp/ACDC & Alison Hell/01 Bad to the Bone.mp3
Item search terms: George Thorogood & The Destroyers - Bad To The Bone
removing 1 old duplicated items
Sending event: database_change
Sending event: item_removed
deleting duplicate /root/Music/Non-Album/Annihilator/Alison Hell (remastered version).mp3
Sending event: import_task_created
Sending event: trackinfo_received
Sending event: trackinfo_received
Sending event: trackinfo_received
Sending event: trackinfo_received
Sending event: trackinfo_received
Found 5 candidates.

/media/data/musictemp/ACDC & Alison Hell/01 Bad to the Bone.mp3
Sending event: before_choose_candidate
Correcting track tags from:
    George Thorogood & The Destroyers - Bad To The Bone
To:
    George Thorogood & The Destroyers - Bad to the Bone
URL:
    http://musicbrainz.org/recording/bb410a88-4cd0-481a-9813-b855d2d1a95f
(Similarity: 100.0%)
Sending event: import_task_choice
found duplicates: [2]
This item is already in the library!
could not get filesize: [Errno 2] No such file or directory: '/root/Music/Non-Album/George Thorogood & The Destroyers/Bad to the Bone.mp3'
Old: MP3, 320kbps, 4:56, 0.0 B
New: MP3, 320kbps, 4:56, 11.3 MiB
[S]kip new, Keep both, Remove old? Sending event: albuminfo_received
Sending event: albuminfo_received
Sending event: albuminfo_received
Sending event: albuminfo_received
Sending event: albuminfo_received
Evaluating 5 candidates.
Candidate: Arcade Fire - Neon Bible
Success. Distance: 0.00
Candidate: Arcade Fire - Neon Bible
Success. Distance: 0.00
Candidate: Arcade Fire - Neon Bible
Success. Distance: 0.01
Candidate: Arcade Fire - Neon Bible
Success. Distance: 0.02
Candidate: Arcade Fire - Neon Bible
Sending event: item_copied
Success. Distance: 0.00
Sending event: import_task_start
Looking up: /media/data/musictemp/Bach - Magnificat
Tagging Bach - Magnificat BWV 243 (Herreweghe)
No album IDs found.
Search terms: Bach - Magnificat BWV 243 (Herreweghe)
Album might be VA: False
Sending event: database_change
Sending event: write
Sending event: after_write
Sending event: database_change
Sending event: import_task_files
Sending event: item_imported
Sending event: import_task_created
Sending event: import_task_created
Sending event: import_task_created
Sending event: import_task_created
^CSending event: import_task_created
Sending event: albuminfo_received
Sending event: albuminfo_received
Sending event: albuminfo_received
Sending event: albuminfo_received
Sending event: albuminfo_received
Evaluating 5 candidates.
Candidate: Johann Sebastian Bach; Scottish Chamber Orchestra, Raymond Leppard, Orchestre de Chambre de Lausanne, Michel Corboz - Cantates célèbres / Magnificat in D major, BWV 243
Success. Distance: 0.60
Candidate: Johann Sebastian Bach; Nikolaus Harnoncourt - Mass In B Minor BWV 232 - Magnificat In D Major BWV 243
^XSuccess. Distance: 0.59
Candidate: Johann Sebastian Bach; Barbara Schlick, Agnès Mellon, Gérard Lesne, Howard Crook, Peter Kooij, Collegium Vocale Gent, La Chapelle Royale, Philippe Herreweghe - Magnificat / Cantate BWV 80
Success. Distance: 0.37
Candidate: Johann Sebastian Bach; Barbara Schlick, Agnès Mellon, Gérard Lesne, Howard Crook, Peter Kooij, Collegium Vocale Gent, La Chapelle Royale, Philippe Herreweghe - Magnificat / Cantate BWV 80
Success. Distance: 0.37
Candidate: Johann Sebastian Bach; Gächinger Kantorei Stuttgart, Bach-Collegium Stuttgart, Helmuth Rilling - Magnificat BWV 243, Schemelli Song Book
Success. Distance: 0.58
b
Enter one of S, K, R: r
Sending event: import_task_apply
0 of 1 items replaced
Sending event: database_change
Sending event: database_change
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/beets/ui/__init__.py", line 1236, in main
    _raw_main(args)
  File "/usr/local/lib/python2.7/dist-packages/beets/ui/__init__.py", line 1226, in _raw_main
    subcommand.func(lib, suboptions, subargs)
  File "/usr/local/lib/python2.7/dist-packages/beets/ui/commands.py", line 966, in import_func
    import_files(lib, paths, query)
  File "/usr/local/lib/python2.7/dist-packages/beets/ui/commands.py", line 943, in import_files
    session.run()
  File "/usr/local/lib/python2.7/dist-packages/beets/importer.py", line 321, in run
    pl.run_parallel(QUEUE_SIZE)
  File "/usr/local/lib/python2.7/dist-packages/beets/util/pipeline.py", line 416, in run_parallel
    threads[-1].join(1)
  File "/usr/lib/python2.7/threading.py", line 960, in join
    self.__block.wait(delay)
  File "/usr/lib/python2.7/threading.py", line 359, in wait
    _sleep(delay)
KeyboardInterrupt

jeromebruzaud avatar Mar 07 '16 21:03 jeromebruzaud

Reading this, I suppose that I should not use sudo.

My bad I am sorry. Thank you for your help.

jeromebruzaud avatar Mar 07 '16 21:03 jeromebruzaud

That explains it:

osmc@osmc:~$ sudo beet -v import /media/data/musictemp
no user configuration found at /root/.config/beets/config.yaml

Under sudo, beets is looking for its configuration under root's $HOME.

sampsyo avatar Mar 07 '16 21:03 sampsyo

Yep, you got it!

sampsyo avatar Mar 07 '16 21:03 sampsyo