Error after update

Hi all

My Sickrage is no longer working after a recent minor OS update. See the error message below. I have tried pulling the latest version from git and updating, this is running fine.

OS: Debian Buster
HV: Proxmox

Thanks for any help!

/opt/sickrage# python3.7 SiCKRAGE.py
22:50:44 INFO::CORE::Performing disk space checks
22:50:44 INFO::CORE::Performing integrity check on main database
22:50:44 INFO::CORE::Performing upgrades on main database
22:50:44 INFO::CORE::Backing up main database
22:50:44 INFO::CORE::Backing up main database table alembic_version schema
22:50:44 INFO::CORE::Backing up main database table blacklist schema
22:50:44 INFO::CORE::Backing up main database table failed_snatch_history schema
22:50:44 INFO::CORE::Backing up main database table failed_snatches schema
22:50:44 INFO::CORE::Backing up main database table history schema
22:50:44 INFO::CORE::Backing up main database table imdb_info schema
22:50:44 INFO::CORE::Backing up main database table tv_shows schema
22:50:44 INFO::CORE::Backing up main database table indexer_mapping schema
22:50:44 INFO::CORE::Backing up main database table series_provider_mapping schema
Traceback (most recent call last):
File “/opt/sickrage/sickrage/init.py”, line 401, in main
app.start()
File “/opt/sickrage/sickrage/core/init.py”, line 310, in start
self.main_db.setup()
File “/opt/sickrage/sickrage/core/databases/init.py”, line 188, in setup
self.upgrade()
File “/opt/sickrage/sickrage/core/databases/init.py”, line 209, in upgrade
self.backup(backup_filename)
File “/opt/sickrage/sickrage/core/databases/init.py”, line 254, in backup
backup_dict[‘schema’].update({table_name: str(CreateTable(table_object))})
File “/usr/local/lib/python3.7/dist-packages/sqlalchemy/sql/elements.py”, line 486, in str
return str(self.compile())
File “”, line 1, in
File “/usr/local/lib/python3.7/dist-packages/sqlalchemy/sql/elements.py”, line 476, in compile
return self._compiler(dialect, bind=bind, **kw)
File “/usr/local/lib/python3.7/dist-packages/sqlalchemy/sql/ddl.py”, line 29, in _compiler
return dialect.ddl_compiler(dialect, self, **kw)
File “/usr/local/lib/python3.7/dist-packages/sqlalchemy/sql/compiler.py”, line 319, in init
self.string = self.process(self.statement, **compile_kwargs)
File “/usr/local/lib/python3.7/dist-packages/sqlalchemy/sql/compiler.py”, line 350, in process
return obj._compiler_dispatch(self, **kwargs)
File “/usr/local/lib/python3.7/dist-packages/sqlalchemy/sql/visitors.py”, line 95, in _compiler_dispatch
return meth(self, **kw)
File “/usr/local/lib/python3.7/dist-packages/sqlalchemy/sql/compiler.py”, line 2919, in visit_create_table
_include_foreign_key_constraints=create.include_foreign_key_constraints, # noqa
File “/usr/local/lib/python3.7/dist-packages/sqlalchemy/sql/compiler.py”, line 2970, in create_table_constraints
for constraint in constraints
File “/usr/local/lib/python3.7/dist-packages/sqlalchemy/sql/compiler.py”, line 2967, in
p
File “/usr/local/lib/python3.7/dist-packages/sqlalchemy/sql/compiler.py”, line 2977, in
or not getattr(constraint, “use_alter”, False)
File “/usr/local/lib/python3.7/dist-packages/sqlalchemy/sql/compiler.py”, line 350, in process
return obj._compiler_dispatch(self, **kwargs)
File “/usr/local/lib/python3.7/dist-packages/sqlalchemy/sql/visitors.py”, line 95, in _compiler_dispatch
return meth(self, **kw)
File “/usr/local/lib/python3.7/dist-packages/sqlalchemy/sql/compiler.py”, line 3217, in visit_foreign_key_constraint
remote_table = list(constraint.elements)[0].column.table
File “/usr/local/lib/python3.7/dist-packages/sqlalchemy/util/langhelpers.py”, line 883, in get
obj.dict[self.name] = result = self.fget(obj)
File “/usr/local/lib/python3.7/dist-packages/sqlalchemy/sql/schema.py”, line 2157, in column
colname,
sqlalchemy.exc.NoReferencedColumnError: Could not initialize target column for ForeignKey ‘tv_shows.series_id’ on table ‘series_provider_mapping’: table ‘tv_shows’ has no column named ‘series_id’
Sentry is attempting to send 0 pending error messages
Waiting up to 2 seconds

can you restore a backup of your main.db file prior ?

if not, you can email me the main.db file and I can remove the table causing the issue and send it back.

Where would I find my main.db file? I did a find but couldn’t track it down. Thanks.

should be in ~/.sickrage

sent back the fixed version of this

All working, thanks so much!

1 Like

Afternoon

Just a follow up on this. I am having one issue and am not sure if its related to the database rebuild. I can’t seem to save my nzbgeek API key. If I put it in and press save it shows there and reports that it saved correctly, but if I navigate back it is blank.

Thanks

New version is out that fixes that as well :wink: