Import Traktor NML drops error "UNIQUE constraint failed: Track.path"

Hello, I want to import a Traktor Pro 3.5.2 database. Jobs starts an instantly shows Playlists in left tree view. Jobs is completed and all playlist disappear. In the Engine OS logfile I can find the following error message:

  • Query string: INSERT INTO Track [2022-02-14T11:49:05.699Z] [air.planck.librarian ] [C] (“id”,“playOrder”,“length”,“bpm”,“year”,“path”,“filename”,“bitrate”,"bpmAnalyze…
  • Error: SQLITE_CONSTRAINT ( [2022-02-14T11:49:05.699Z] [air.planck.librarian ] [C] UNIQUE constraint failed: Track.path) [2022-02-14T11:49:05.699Z] [air.planck.librarian ] [W] Unable to add tracks to Traktor database [2022-02-14T11:49:05.701Z] [air.planck.traktor ]

Is there a possibility to raise the log level, to see sql statement causing this error? What could be the reason for this error?

Regards

Here’s how it looks for me.

I go to the Traktor symbol and my Traktor library appears. Hit the refresh to see your collection. The pic show only what I imported to my usb stick.

en1

Thanks for your reply. My procedure is exact like your’s. I also tried this procedure with an exported collection in a new NML file. But error still occurs.

There is a duplicate in tour Traktor NML, search for that and fix it….

EDIT: Another possible explanation is that you already have certain tracks in your collection.

Engine DJ doesn’t want to have 1 MP3 file referenced multiple times in it’s library. Therefore it has a database constraint that path should be a unique value, which throws the error you see. It’s a shame the INSERT query is truncated so that you cannot see which file this is about, but in the end, Engine DJ has no way to know what to do here…

1 Like

Thank you for your reply. You are right. Engine DJ has a unique contraint on “Filename”. But you can import the files with identical names in different folder to your Traktor library. The solution how to find out which filenames are duplicate is:

  • export your collection with the option “copy tracks to destination”. Due to the fact that Traktor copies all files into one directory there is an error message for each duplicate file. Note it and delete it in your original collection
  • sort a tracks by filename and identify duplicates manually.

A suggestion for a denon software optimization is: catch the constraint exception and write the duplicate filename to the error log

1 Like

Not exactly, the UNIQUE constraint in Denon is path, just as Traktor, not filename.

But a XML file (NML) can easily be corrupted over time. I had my own issues migrating Traktor to Denon, more specifically regarding some funky characters which had creeped into my NML…

You are right about the logging though :wink:

2 Likes

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.