Hmm i can't see any issues with your database. Could you try and turn on debug mode using BK_DEBUG=true and paste the full error message here? When i start a container using your attached database i can add 75105 without issues.
Hmm i can't see any issues with your database. Could you try and turn on debug mode using `BK_DEBUG=true` and paste the full error message here? When i start a container using your attached database i can add 75105 without issues.
Thanks, i see the issue. If you choose owner when adding a set, you get an error, but if you add a set, then assign an owner, there's no issues. I'll look at a fix.
For now, just add a set without assigning owner, then assign it later on the sets-details page.
Thanks, i see the issue. If you choose owner when adding a set, you get an error, but if you add a set, then assign an owner, there's no issues. I'll look at a fix.
For now, just add a set without assigning owner, then assign it later on the sets-details page.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Hi,
getting this in add, and bulk add, no matter the ID.
Error: Error while importing set 75105-1: FOREIGN KEY constraint failed.
In latest and in dev
Hmm i can't see any issues with your database. Could you try and turn on debug mode using
BK_DEBUG=trueand paste the full error message here? When i start a container using your attached database i can add 75105 without issues.The latest dev made it work again, thanks.
I was wrong. The error comes when selecting owner.
2025-12-21T10:18:55.482155000Z DEBUG:bricktracker.sql:SQLite3: execute: INSERT INTO "bricktracker_set_owners" ( "id", "owner_0c1170bc_1084_46bf_b8c5_1f0ed9013d57" ) VALUES ( :set_id, :state ) ON CONFLICT("id") DO UPDATE SET "owner_0c1170bc_1084_46bf_b8c5_1f0ed9013d57" = :state WHERE "bricktracker_set_owners"."id" IS NOT DISTINCT FROM :set_id 2025-12-21T10:18:55.482217000Z DEBUG:bricktracker.socket:Socket: FAIL=({'message': 'Error while importing set 77243-1: FOREIGN KEY constraint failed'},) (to: iTbbbnvw0HDKCjy_AAAD) 2025-12-21T10:18:55.482282000Z DEBUG:bricktracker.sql:SQLite3: close 2025-12-21T10:18:55.487872000Z DEBUG:bricktracker.set:Traceback (most recent call last): 2025-12-21T10:18:55.487916000Z File "/app/bricktracker/set.py", line 90, in download 2025-12-21T10:18:55.487981000Z owner.update_set_state(self, state=True) 2025-12-21T10:18:55.488000000Z ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^ 2025-12-21T10:18:55.488017000Z File "/app/bricktracker/metadata.py", line 194, in update_set_state 2025-12-21T10:18:55.488031000Z rows, _ = BrickSQL().execute_and_commit( 2025-12-21T10:18:55.488048000Z ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ 2025-12-21T10:18:55.488060000Z self.update_set_state_query, 2025-12-21T10:18:55.488082000Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2025-12-21T10:18:55.488096000Z parameters=parameters, 2025-12-21T10:18:55.488109000Z ^^^^^^^^^^^^^^^^^^^^^^ 2025-12-21T10:18:55.488121000Z name=self.as_column(), 2025-12-21T10:18:55.488133000Z ^^^^^^^^^^^^^^^^^^^^^^ 2025-12-21T10:18:55.488145000Z ) 2025-12-21T10:18:55.488157000Z ^ 2025-12-21T10:18:55.488176000Z File "/app/bricktracker/sql.py", line 223, in execute_and_commit 2025-12-21T10:18:55.488188000Z rows, query = self.execute(query, parameters=parameters, **context) 2025-12-21T10:18:55.488201000Z ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2025-12-21T10:18:55.488215000Z File "/app/bricktracker/sql.py", line 195, in execute 2025-12-21T10:18:55.488230000Z result = self.raw_execute(query, parameters) 2025-12-21T10:18:55.488243000Z File "/app/bricktracker/sql.py", line 318, in raw_execute 2025-12-21T10:18:55.488255000Z return self.cursor.execute(query, parameters) 2025-12-21T10:18:55.488273000Z ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^ 2025-12-21T10:18:55.488285000Z sqlite3.IntegrityError: FOREIGN KEY constraint failedThanks, i see the issue. If you choose owner when adding a set, you get an error, but if you add a set, then assign an owner, there's no issues. I'll look at a fix.
For now, just add a set without assigning owner, then assign it later on the sets-details page.
Can you try the
devbranch again? #121 should fix it.Yes, it works now. Thanks.
Awesome, fix is pushed to
latestand1.3.1