royerlab / ultrack

Cell tracking and segmentation software
https://royerlab.github.io/ultrack
BSD 3-Clause "New" or "Revised" License
64 stars 7 forks source link

Improve error message when adding nodes to existing database #100

Open JoOkuma opened 1 month ago

JoOkuma commented 1 month ago

This should suggest to use the overwrite=True flag, right now it returns

sqlalchemy.exc.IntegrityError: (sqlite3.IntegrityError) UNIQUE constraint failed: nodes.id
[SQL: INSERT INTO nodes (t, id, parent_id, hier_parent_id, t_node_id, t_hier_id, z, y, x, z_shift, y_shift, x_shift, area, selected, pickle, annotation, division) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)]
[SQL parameters hidden due to hide_parameters=True]
(Background on this error at: https://sqlalche.me/e/14/gkpj)

not very useful