Question

Running CouchPotato on a Synology NAS, and I believe CouchPotato recently tried to auto-update itself, because it suddenly stopped working. I tried the solution recommended here, but that doesn't work. Judging from the logs, it looks like some SQL update is trying to run but it returns an error:

07:09:56 CRITICAL [                 __main__] Traceback (most recent call last):
  File "/usr/local/couchpotatoserver/share/CouchPotatoServer/CouchPotato.py", line 128, in <module>
l.run()
  File "/usr/local/couchpotatoserver/share/CouchPotatoServer/CouchPotato.py", line 83, in run
runCouchPotato(self.options, base_path, sys.argv[1:], data_dir = self.data_dir, log_dir = self.log_dir, Env = Env)
  File "/volume1/@appstore/couchpotatoserver/share/CouchPotatoServer/couchpotato/runner.py", line 207, in runCouchPotato
upgrade(db, repo)
  File "/usr/local/couchpotatoserver/share/CouchPotatoServer/libs/migrate/versioning/api.py", line 186, in upgrade
return _migrate(url, repository, version, upgrade=True, err=err, **opts)
  File "<string>", line 2, in _migrate
  File "/usr/local/couchpotatoserver/share/CouchPotatoServer/libs/migrate/versioning/util/__init__.py", line 159, in with_engine
return f(*a, **kw)
  File "/usr/local/couchpotatoserver/share/CouchPotatoServer/libs/migrate/versioning/api.py", line 366, in _migrate
schema.runchange(ver, change, changeset.step)
  File "/usr/local/couchpotatoserver/share/CouchPotatoServer/libs/migrate/versioning/schema.py", line 91, in runchange
change.run(self.engine, step)
  File "/usr/local/couchpotatoserver/share/CouchPotatoServer/libs/migrate/versioning/script/py.py", line 145, in run
script_func(engine)
  File "/usr/local/couchpotatoserver/share/CouchPotatoServer/couchpotato/core/migration/versions/001_Releases_last_edit.py", line 15, in upgrade
create_column(last_edit_column, release)
  File "/usr/local/couchpotatoserver/share/CouchPotatoServer/libs/migrate/changeset/schema.py", line 38, in create_column
return table.create_column(column, *p, **kw)
  File "/usr/local/couchpotatoserver/share/CouchPotatoServer/libs/migrate/changeset/schema.py", line 426, in create_column
column.create(table=self, *p, **kw)
  File "/usr/local/couchpotatoserver/share/CouchPotatoServer/libs/migrate/changeset/schema.py", line 528, in create
engine._run_visitor(visitorcallable, self, connection, **kwargs)
  File "/usr/local/couchpotatoserver/share/CouchPotatoServer/libs/sqlalchemy/engine/base.py", line 2302, in _run_visitor
conn._run_visitor(visitorcallable, element, **kwargs)
  File "/usr/local/couchpotatoserver/share/CouchPotatoServer/libs/sqlalchemy/engine/base.py", line 1972, in _run_visitor
**kwargs).traverse_single(element)
  File "/usr/local/couchpotatoserver/share/CouchPotatoServer/libs/migrate/changeset/ansisql.py", line 53, in traverse_single
ret = super(AlterTableVisitor, self).traverse_single(elem)
  File "/usr/local/couchpotatoserver/share/CouchPotatoServer/libs/sqlalchemy/sql/visitors.py", line 106, in traverse_single
return meth(obj, **kw)
  File "/usr/local/couchpotatoserver/share/CouchPotatoServer/libs/migrate/changeset/databases/sqlite.py", line 75, in visit_column
super(SQLiteColumnGenerator,self).visit_column(column)
  File "/usr/local/couchpotatoserver/share/CouchPotatoServer/libs/migrate/changeset/ansisql.py", line 101, in visit_column
self.execute()
  File "/usr/local/couchpotatoserver/share/CouchPotatoServer/libs/migrate/changeset/ansisql.py", line 42, in execute
return self.connection.execute(self.buffer.getvalue())
  File "/usr/local/couchpotatoserver/share/CouchPotatoServer/libs/sqlalchemy/engine/base.py", line 1449, in execute
params)
  File "/usr/local/couchpotatoserver/share/CouchPotatoServer/libs/sqlalchemy/engine/base.py", line 1628, in _execute_text
statement, parameters
  File "/usr/local/couchpotatoserver/share/CouchPotatoServer/libs/sqlalchemy/engine/base.py", line 1698, in _execute_context
context)
  File "/usr/local/couchpotatoserver/share/CouchPotatoServer/libs/sqlalchemy/engine/base.py", line 1691, in _execute_context
context)
  File "/usr/local/couchpotatoserver/share/CouchPotatoServer/libs/sqlalchemy/engine/default.py", line 331, in do_execute
cursor.execute(statement, parameters)
OperationalError: (OperationalError) duplicate column name: last_edit '\nALTER TABLE release ADD last_edit INTEGER' ()

The last line seems to be the key, ie. the error "duplicate column name: last_edit '\nALTER TABLE release ADD last_edit INTEGER' ()".

Any thoughts on how to fix this?

Was it helpful?

Solution

The final solution I ended up with was to uninstall it, then install custom CouchPotato package specifying the RuudBurger repo as described here. If you don't use the RuudBurger repo, then you get the french CouchPotato.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top