Getting error adding any sets #119
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Error: Error while importing set 75383-1: FOREIGN KEY constraint failed
Tried several different sets and it gets to 50-50% and then hangs and i get this error.
What docker tag are you using and what database version are you on?
Believe I am on the latest tag and it is the database that deploys with the container.
Here is my Compose:
bricktracker:
container_name: bricktracker
image: gitea.baerentsen.space/frederikbaerentsen/bricktracker:latest
labels:
- homepage.group=Documentation Containers
- homepage.name=Bricktracker
- homepage.icon=https://gitea.baerentsen.space/FrederikBaerentsen/BrickTracker/raw/branch/master/static/brick.png
- homepage.href=https://bricktracker.wigginsmedia.us
- homepage.description=Bricktracker - For organizing and tracking LEGO sets, parts, and minifigures
### WhatsUpDocker Settings
- wud.display.name=BrickTracker
- wud.watch=true
### Docker-Volume-Backup
- docker-volume-backup.stop-during-backup=utilities
- docker-volume-backup.exec-label=utilities
ports:
- "5019:3333"
volumes:
- ${USERDIR}/utilities/bricktracker/bricktracker-data/:/app/data/
# - ${USERDIR}/utilities/bricktracker/instructions:/app/static/instructions/
# - ${USERDIR}/utilities/bricktracker/minifigures:/app/static/minifigures/
# - ${USERDIR}/utilities/bricktracker/parts:/app/static/parts/
# - ${USERDIR}/utilities/bricktracker/sets:/app/static/sets/
# Or define those in your .env file
#environment:
#BK_DATABASE_PATH: app/app.db
#BK_MINIFIGURES_FOLDER: app/minifigs
#BK_RETIRED_SETS_PATH: app/retired_sets.csv
#BK_THEMES_PATH: app/themes.csv
#BK_INSTRUCTIONS_FOLDER: app/instructions
#BK_PARTS_FOLDER: app/parts
#BK_SETS_FOLDER: app/sets
# BK_REBRICKABLE_API_KEY: "xxxxxxxxxxxxxxxxx"
# BK_DOMAIN_NAME: "127.0.0.1:5019"
#BK_PURCHASE_CURRENCY: "$"
#BK_PURCHASE_DATE_FORMAT: "%m/%d/%Y"
#BK_FILE_DATETIME_FORMAT: "%m/%d/%Y, %H:%M:%S"
#BK_REBRICKABLE_LINKS: true
#BK_BRICKLINK_LINKS: true
#BK_AUTHENTICATION_KEY: 'xxxxxxxxxxxxxxxxx'
#BK_AUTHENTICATION_PASSWORD: ${NTFY_PASS}
#env_file: ".env"
restart: unless-stopped
And the new .env file looks like:
I did the upgrade the other day to DB version 20 I think it said and everything worked fine after the upgrade and I switched the storage mount points plus moved to the .env settings. I used it several times yesterday without issues so confused as to what changed
Hmm okay that's weird. Could you share a copy of your db and i'll try and see what the issue is?
Or could you run these for me?
Hi @FrederikBaerentsen I've got the same issue - fresh install today.
Can't attach the app.db file but I've renamed it to .txt
@dilbert and @Thinning9833
Can you try the
devdocker tag? I pushed a fix that might work.Hi @FrederikBaerentsen seems to work now on :dev 👍
This is the error I get from inside the container when i run those commands.
sqlite3 /app/data/app.db "PRAGMA user_version"
sh: 4: sqlite3: not found
ls -la /app/data/
total 11700
drwxr-xr-x 6 root root 4096 Dec 20 20:23 .
drwxr-xr-x 1 root root 4096 Dec 20 20:23 ..
-rw-r--r-- 1 root root 21701 Dec 18 23:37 .env
-rw-r--r-- 1 root root 11255808 Dec 20 20:23 app.db
drwxr-xr-x 2 root root 118784 Dec 20 14:38 instructions
drwxr-xr-x 2 root root 20480 Dec 19 00:55 minifigures
drwxr-xr-x 2 root root 372736 Dec 19 00:55 parts
-rw-r--r-- 1 root root 109563 Sep 3 11:11 retired_sets.csv
drwxr-xr-x 2 root root 32768 Dec 20 14:34 sets
-rw-r--r-- 1 root root 10017 Aug 9 22:11 themes.csv
sqlite3 /app/data/app.db "PRAGMA foreign_keys"
sh: 6: sqlite3: not found
I also pulled the DEV branch and restart the compose stack and get the same result when I attempt to add a new Set
@Thinning9833 You need to run the sqlite3 commands on the database from your host system. The container does not have sqlite3 outside of python.
After pulling the
devbranch, did you update the image in your compose file toimage: gitea.baerentsen.space/frederikbaerentsen/bricktracker:dev?If so please send me a copy of your db in order for me to check what's wrong, as using the
devbranch fixed it for dilbert.jeffreyswiggins@ubuntu-docker02:
/docker/utilities$ sudo sqlite3 bricktracker/bricktracker-data/app.db "PRAGM/docker/utilities$ sudo sqlite3 bricktracker/bricktracker-data/app.db "PRAGMA user_version"
20
jeffreyswiggins@ubuntu-docker02:
A foreign_keys"
0
jeffreyswiggins@ubuntu-docker02:
/docker/utilities$ sudo sqlite3 bricktracker/bricktracker-data/app.db "PRAGM/docker/utilities$ sudo sqlite3 bricktracker/bricktracker-data/app.db "PRAGMA foreign_key_check(bricktracker_parts)"A foreign_key_check"
bricktracker_sets|191|rebrickable_sets|2
jeffreyswiggins@ubuntu-docker02:
@Thinning9833
Looking at your DB, did you seem to have an existing orphaned record with set
21330-1.bricktracker_setsrowid 191 has set21330-1But
rebrickable_setshas no matching record for21330-1You should run
then
I'm not getting any issues using
dev,1.3.1or the newly pushedlatestwith your database.Awesome that worked and I can now add sets. Should I go back to using the main branch now?
Awesome glad that it worked! Yeah you can switch to
latestor1.3.1:)