Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue sync kitsu to new server #7275

Open
ArduinoLeone opened this issue Jan 13, 2025 · 0 comments
Open

issue sync kitsu to new server #7275

ArduinoLeone opened this issue Jan 13, 2025 · 0 comments

Comments

@ArduinoLeone
Copy link

Hello everyone, I need to migrate Kitsu from one server to another. I tried using the guide at https://zou.cg-wire.com/sync/. However, when I run the following command:

SYNC_LOGIN="[email protected]"
SYNC_PASSWORD="password"
zou sync-full --source http://yourpreviouskitsu.url/api --no-projects

i recive this

Start syncing.
2025-01-13 18:16:39,619 - INFO - 1 studios synced.
2025-01-13 18:16:39,709 - INFO - 12 departments synced.
2025-01-13 18:16:39,821 - INFO - 26 task-types synced.
Traceback (most recent call last):
File "/opt/zou/zouenv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1967, in _exec_single_context
self.dialect.do_execute(
File "/opt/zou/zouenv/lib/python3.12/site-packages/sqlalchemy/engine/default.py", line 941, in do_execute
cursor.execute(statement, parameters)
File "/opt/zou/zouenv/lib/python3.12/site-packages/psycopg/cursor.py", line 97, in execute
raise ex.with_traceback(None)
psycopg.errors.UniqueViolation: duplicate key value violates unique constraint "ix_task_status_short_name"
DETAIL: Key (short_name)=(approved) already exists.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/opt/zou/zouenv/bin/zou", line 8, in
sys.exit(cli())
^^^^^
File "/opt/zou/zouenv/lib/python3.12/site-packages/click/core.py", line 1161, in call
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/zou/zouenv/lib/python3.12/site-packages/click/core.py", line 1082, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/opt/zou/zouenv/lib/python3.12/site-packages/click/core.py", line 1697, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/zou/zouenv/lib/python3.12/site-packages/click/core.py", line 1443, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/zou/zouenv/lib/python3.12/site-packages/click/core.py", line 788, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/zou/zouenv/lib/python3.12/site-packages/zou/cli.py", line 328, in sync_full
commands.import_data_from_another_instance(
File "/opt/zou/zouenv/lib/python3.12/site-packages/zou/app/utils/commands.py", line 500, in import_data_from_another_instance
sync_service.run_main_data_sync(project=project)
File "/opt/zou/zouenv/lib/python3.12/site-packages/zou/app/services/sync_service.py", line 291, in run_main_data_sync
sync_entries(path, model, project=project)
File "/opt/zou/zouenv/lib/python3.12/site-packages/zou/app/services/sync_service.py", line 439, in sync_entries
model.create_from_import_list(results["data"])
File "/opt/zou/zouenv/lib/python3.12/site-packages/zou/app/models/base.py", line 181, in create_from_import_list
cls.create_from_import(data)
File "/opt/zou/zouenv/lib/python3.12/site-packages/zou/app/models/base.py", line 163, in create_from_import
return cls.create(**data)
^^^^^^^^^^^^^^^^^^
File "/opt/zou/zouenv/lib/python3.12/site-packages/zou/app/models/base.py", line 90, in create
db.session.commit()
File "/opt/zou/zouenv/lib/python3.12/site-packages/sqlalchemy/orm/scoping.py", line 597, in commit
return self._proxied.commit()
^^^^^^^^^^^^^^^^^^^^^^
File "/opt/zou/zouenv/lib/python3.12/site-packages/sqlalchemy/orm/session.py", line 2028, in commit
trans.commit(_to_root=True)
File "", line 2, in commit
File "/opt/zou/zouenv/lib/python3.12/site-packages/sqlalchemy/orm/state_changes.py", line 139, in _go
ret_value = fn(self, *arg, **kw)
^^^^^^^^^^^^^^^^^^^^
File "/opt/zou/zouenv/lib/python3.12/site-packages/sqlalchemy/orm/session.py", line 1313, in commit
self._prepare_impl()
File "", line 2, in _prepare_impl
File "/opt/zou/zouenv/lib/python3.12/site-packages/sqlalchemy/orm/state_changes.py", line 139, in _go
ret_value = fn(self, *arg, **kw)
^^^^^^^^^^^^^^^^^^^^
File "/opt/zou/zouenv/lib/python3.12/site-packages/sqlalchemy/orm/session.py", line 1288, in _prepare_impl
self.session.flush()
File "/opt/zou/zouenv/lib/python3.12/site-packages/sqlalchemy/orm/session.py", line 4352, in flush
self._flush(objects)
File "/opt/zou/zouenv/lib/python3.12/site-packages/sqlalchemy/orm/session.py", line 4487, in _flush
with util.safe_reraise():
File "/opt/zou/zouenv/lib/python3.12/site-packages/sqlalchemy/util/langhelpers.py", line 146, in exit
raise exc_value.with_traceback(exc_tb)
File "/opt/zou/zouenv/lib/python3.12/site-packages/sqlalchemy/orm/session.py", line 4448, in _flush
flush_context.execute()
File "/opt/zou/zouenv/lib/python3.12/site-packages/sqlalchemy/orm/unitofwork.py", line 466, in execute
rec.execute(self)
File "/opt/zou/zouenv/lib/python3.12/site-packages/sqlalchemy/orm/unitofwork.py", line 642, in execute
util.preloaded.orm_persistence.save_obj(
File "/opt/zou/zouenv/lib/python3.12/site-packages/sqlalchemy/orm/persistence.py", line 93, in save_obj
_emit_insert_statements(
File "/opt/zou/zouenv/lib/python3.12/site-packages/sqlalchemy/orm/persistence.py", line 1048, in _emit_insert_statements
result = connection.execute(
^^^^^^^^^^^^^^^^^^^
File "/opt/zou/zouenv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1418, in execute
return meth(
^^^^^
File "/opt/zou/zouenv/lib/python3.12/site-packages/sqlalchemy/sql/elements.py", line 515, in _execute_on_connection
return connection._execute_clauseelement(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/zou/zouenv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1640, in _execute_clauseelement
ret = self._execute_context(
^^^^^^^^^^^^^^^^^^^^^^
File "/opt/zou/zouenv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1846, in _execute_context
return self._exec_single_context(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/zou/zouenv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1986, in _exec_single_context
self._handle_dbapi_exception(
File "/opt/zou/zouenv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 2355, in _handle_dbapi_exception
raise sqlalchemy_exception.with_traceback(exc_info[2]) from e
File "/opt/zou/zouenv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1967, in _exec_single_context
self.dialect.do_execute(
File "/opt/zou/zouenv/lib/python3.12/site-packages/sqlalchemy/engine/default.py", line 941, in do_execute
cursor.execute(statement, parameters)
File "/opt/zou/zouenv/lib/python3.12/site-packages/psycopg/cursor.py", line 97, in execute
raise ex.with_traceback(None)
sqlalchemy.exc.IntegrityError: (psycopg.errors.UniqueViolation) duplicate key value violates unique constraint "ix_task_status_short_name"
DETAIL: Key (short_name)=(approved) already exists.
[SQL: INSERT INTO task_status (name, archived, short_name, description, color, priority, is_done, is_artist_allowed, is_client_allowed, is_retake, is_feedback_request, is_default, shotgun_id, for_concept, id, created_at, updated_at) VALUES (%(name)s::VARCHAR, %(archived)s, %(short_name)s::VARCHAR, %(description)s::VARCHAR, %(color)s::VARCHAR, %(priority)s::INTEGER, %(is_done)s, %(is_artist_allowed)s, %(is_client_allowed)s, %(is_retake)s, %(is_feedback_request)s, %(is_default)s, %(shotgun_id)s::INTEGER, %(for_concept)s, %(id)s::UUID, %(created_at)s::TIMESTAMP WITHOUT TIME ZONE, %(updated_at)s::TIMESTAMP WITHOUT TIME ZONE)]
[parameters: {'name': 'Approved', 'archived': False, 'short_name': 'approved', 'description': None, 'color': '#66BB6A', 'priority': 1, 'is_done': False, 'is_artist_allowed': False, 'is_client_allowed': True, 'is_retake': False, 'is_feedback_request': False, 'is_default': False, 'shotgun_id': None, 'for_concept': False, 'id': '519211e2-cd88-486a-b504-0126dfd2a829', 'created_at': '2024-01-10T12:30:59', 'updated_at': '2024-02-04T20:13:44'}]
(Background on this error at: https://sqlalche.me/e/20/gkpj)

any idea or help ?

thx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant