PDA

View Full Version : 6.5.0 scan error (sql)



zulu
2006-10-08, 05:22
I just upgraded from 6.3.1 to 6.5.0 (freebsd). I'm getting the following error, any ideas?


2006-10-08 05:09:18.6703 About to look for files in /d1a/music/lib
2006-10-08 05:09:18.6920 For files with extensions in: [(?i-xsm:\.(?:ape|wma|shn|wav|wave|mp3|mp2|flc|flac|m4a |mov|m4b|mp4|mp+|mpc|ogg|aif|aiff|cue)$)]
2006-10-08 05:09:28.5727 Found 5646 files in /d1a/music/lib

2006-10-08 05:12:24.7648 ERROR: Error executing 'INSERT INTO tracks (audio, audio_offset, audio_size, bitrate, channels, content_type, drm, filesize, id, lossless, rating, remote, samplerate, secs, timestamp, title, titlesearch, titlesort, tracknum, url, year) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)': DBD::mysql::st execute failed: Duplicate entry '7' for key 1 at /home/local/slimserver/CPAN/DBIx/Class/Storage/DBI.pm line 771.

2006-10-08 05:12:24.7705 ERROR: Backtrace follows:

2006-10-08 05:12:24.7708 Backtrace:

frame 0: Slim::Schema::Storage::throw_exception (/home/local/slimserver/CPAN/DBIx/Class/Storage/DBI.pm line 773)
frame 1: DBIx::Class::Storage::DBI::_execute (/home/local/slimserver/CPAN/DBIx/Class/Storage/DBI.pm line 788)
frame 2: DBIx::Class::Storage::DBI::insert (/home/local/slimserver/CPAN/DBIx/Class/Row.pm line 75)
frame 3: DBIx::Class::Row::insert (/home/local/slimserver/CPAN/DBIx/Class/PK/Auto.pm line 43)
frame 4: DBIx::Class::PK::Auto::insert (/home/local/slimserver/CPAN/DBIx/Class/ResultSet.pm line 1335)
frame 5: DBIx::Class::ResultSet::create (/home/local/slimserver/Slim/Schema.pm line 794)
frame 6: Slim::Schema::newTrack (/home/local/slimserver/Slim/Utils/Scanner.pm line 322)
frame 7: Slim::Utils::Scanner::scanDirectory (/home/local/slimserver/Slim/Music/MusicFolderScan.pm line 72)
frame 8: Slim::Music::MusicFolderScan::startScan (/home/local/slimserver/Slim/Music/Import.pm line 393)
frame 9: Slim::Music::Import::runImporter (/home/local/slimserver/Slim/Music/Import.pm line 236)
frame 10: Slim::Music::Import::runScan (/home/local/slimserver/scanner.pl line 179)
frame 11: (eval) (/home/local/slimserver/scanner.pl line 173)
frame 12: main::main (/home/local/slimserver/scanner.pl line 330)

2006-10-08 05:12:24.7738 ERROR: Scanner: Failed when running main scan: [Carp::Clan::__ANON__(): Error executing 'INSERT INTO tracks (audio, audio_offset, audio_size, bitrate, channels, content_type, drm, filesize, id, lossless, rating, remote, samplerate, secs, timestamp, title, titlesearch, titlesort, tracknum, url, year) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)': DBD::mysql::st execute failed: Duplicate entry '7' for key 1 at /home/local/slimserver/CPAN/DBIx/Class/Storage/DBI.pm line 771.
]

2006-10-08 05:12:24.7741 ERROR: Scanner: Skipping post-process & Not updating lastRescanTime!

zulu
2006-10-08, 21:33
Found the bug. The song had a tag called "ID", which confused the scanner because "id" is the PK for the "tracks" table. I think the scanner code should be a bit smarter to deal with these cases. Anyways, I just deleted the "ID" tag and got around the problem.

Probably should be a bug report.