basak / glacier-cli

Command-line interface to Amazon Glacier
Other
617 stars 54 forks source link

glacier vault sync: sqlalchemy.exc.IntegrityError: (IntegrityError) column id is not unique #58

Open amedee opened 9 years ago

amedee commented 9 years ago

I get this error when I do a vault sync:

$ glacier vault sync **********
Traceback (most recent call last):
  File "/root/bin/glacier", line 730, in <module>
    App().main()
  File "/root/bin/glacier", line 716, in main
    self.args.func()
  File "/root/bin/glacier", line 469, in vault_sync
    wait=self.args.wait)
  File "/root/bin/glacier", line 448, in _vault_sync
    self._vault_sync_reconcile(vault, complete_job, fix=fix)
  File "/root/bin/glacier", line 435, in _vault_sync_reconcile
    fix=fix)
  File "/root/bin/glacier", line 257, in mark_seen_upstream
    key=self.key, vault=vault, id=id).one()
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2184, in one
    ret = list(self)
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2226, in __iter__
    self.session._autoflush()
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 1012, in _autoflush
    self.flush()
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 1583, in flush
    self._flush(objects)
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 1654, in _flush
    flush_context.execute()
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/unitofwork.py", line 331, in execute
    rec.execute(self)
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/unitofwork.py", line 475, in execute
    uow
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/persistence.py", line 64, in save_obj
    table, insert)
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/persistence.py", line 530, in _emit_insert_statements
    execute(statement, multiparams)
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1449, in execute
    params)
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1584, in _execute_clauseelement
    compiled_sql, distilled_params
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1698, in _execute_context
    context)
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1691, in _execute_context
    context)
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 331, in do_execute
    cursor.execute(statement, parameters)
sqlalchemy.exc.IntegrityError: (IntegrityError) column id is not unique u'INSERT INTO archive (id, name, vault, "key", last_seen_upstream, created_here, deleted_here) VALUES (?, ?, ?, ?, ?, ?, ?)' (u'***********', u'***********', '**********', '**********', 1433336619, 1433423949.613394, None)

How do I get an unique column id again?