Repository navigation
Description
Description
Random crash when trying to make a repository
I was/ able to reproduce the issue.
Steps to reproduce the behavior:
- Attempt to make a new repository
- Fill out data and passphrase
- Press ok and wait
- See error
Environment
OS: Linux
Release: 7.2.4-300.fc45.x86_64
Version: #1 SMP PREEMPT_DYNAMIC Mon Sep 7 19:09:46 UTC 2026
Date and Time: 2026-09-19 09:51:05
Borg Version: 1.4.5
Vorta Version: 0.11.4
Logs
Traceback (most recent call last):
File "/usr/lib64/python3.15/site-packages/peewee.py", line 8372, in get
return clone.execute(database)[0]
~~~~~~~~~~~~~~~~~~~~~~~^^^
File "/usr/lib64/python3.15/site-packages/peewee.py", line 5342, in getitem
return self.row_cache[item]
~~~~~~~~~~~~~~^^^^^^
IndexError: list index out of range
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.15/site-packages/vorta/views/repo_tab.py", line 294, in process_new_repo
new_repo = RepoModel.get(url=result['params']['repo_url'])
File "/usr/lib64/python3.15/site-packages/peewee.py", line 7880, in get
return sq.get()
~~~~~~^^
File "/usr/lib64/python3.15/site-packages/peewee.py", line 8375, in get
raise self.model.DoesNotExist('%s instance matching query does '
'not exist:\nSQL: %s\nParams: %s' %
(clone.model, sql, params))
vorta.store.models.RepoModelDoesNotExist: <Model: RepoModel> instance matching query does not exist:
SQL: SELECT "t1"."id", "t1"."url", "t1"."name", "t1"."added_at", "t1"."encryption", "t1"."unique_size", "t1"."unique_csize", "t1"."total_size", "t1"."total_unique_chunks", "t1"."create_backup_cmd", "t1"."extra_borg_arguments" FROM "repomodel" AS "t1" WHERE ("t1"."url" = ?) LIMIT ? OFFSET ?
Params: ['/run/media/user/KINGSOTNE/backup', 1, 0]
Activity
NikNikovsky commentedon Sep 19, 2026
I rebooted the computer and this did not come back so idk
ahmershahdev commentedon Sep 24, 2026
NikNikovsky commentedon Sep 24, 2026
Iirc no one took this but I don't see the issue anymore
ahmershahdev commentedon Sep 24, 2026
ansh0014 commentedon Nov 13, 2026
hi, @m3nu ,
i looked into this issue in the codebase and would like to work on it if it's open for contribution.
in
RepoTab.process_new_repo()(src/vorta/views/repo_tab.py), it currently does an unguardedRepoModel.get(url=result['params']['repo_url']), which throwsRepoModelDoesNotExistand crashes the app if the row isn't found.BorgInitJob.process_result()(src/vorta/borg/init.py) andBorgInfoRepoJob.process_result()(src/vorta/borg/info_repo.py) both runRepoModel.get_or_create(...)beforefinished_event()is emitted, so it's not 100% clear what caused the missing record in that session (i couldn't reproduce it locally with peewee + sqlite wal across threads). still,BorgInfoRepoJobusesresult['cmd'][-1]instead ofresult['params']['repo_url'], and any missing or mismatched lookup crashes instead of failing safely.for the fix, i'd like to pass
result['repo_id'] = new_repo.iddirectly fromBorgInitJob.process_result()andBorgInfoRepoJob.process_result()(and switchBorgInfoRepoJobto useresult['params']['repo_url']for consistency). then inRepoTab.process_new_repo(), look up the repo byrepo_idusingget_or_none()with a fallback torepo_url, and if it's stillNone, log it and show an error message instead of crashing, plus add unit tests intests/unit/test_repo.py.if this approach sounds good, could you please assign this issue to me?