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

Database Error during make demo #18

Open
beatreichenbach opened this issue Sep 26, 2023 · 1 comment
Open

Database Error during make demo #18

beatreichenbach opened this issue Sep 26, 2023 · 1 comment

Comments

@beatreichenbach
Copy link

I followed the installation instructions and everything worked well until the the creation of the demo projects. I'm getting this when running the make demo command:

sudo make demo
docker compose exec -T server python -m demogen < demo/feature.json;  docker compose exec -T server python -m demogen < demo/commercial.json;  docker compose exec -T server python -m demogen < demo/episodic.json;
2023-09-26 11:16:43 INFO       Log collector initialized
2023-09-26 11:16:44 INFO       Connecting to database
2023-09-26 11:16:44 INFO       Deleting old project if exists
2023-09-26 11:16:45 INFO       Creating folders for project demo_Big_Feature
Traceback (most recent call last):
  File "/backend/ayon_server/entities/core/projectlevel.py", line 247, in save
    await transaction.execute(
  File "/usr/local/lib/python3.11/site-packages/asyncpg/connection.py", line 319, in execute
    _, status, _ = await self._execute(
                   ^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/asyncpg/connection.py", line 1658, in _execute
    result, _ = await self.__execute(
                ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/asyncpg/connection.py", line 1683, in __execute
    return await self._do_execute(
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/asyncpg/connection.py", line 1730, in _do_execute
    result = await executor(stmt, None)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "asyncpg/protocol/protocol.pyx", line 201, in bind_execute
asyncpg.exceptions.ForeignKeyViolationError: insert or update on table "workfiles" violates foreign key constraint "workfiles_created_by_fkey"
DETAIL:  Key (created_by)=(admin) is not present in table "users".

There are several more errors but always with the same ConstraintViolationException.

@johhnry
Copy link

johhnry commented Oct 27, 2023

Hi,

I have the same issue on 65079d8. This is the steps I followed:

$ git clone https://github.com/ynput/ayon-docker.git
$ cd ayon-docker
$ docker compose up -d

# Create the admin account in the UI on http://<host>:5000

$ make demo
docker compose exec -T server python -m demogen < demo/commercial.json;  docker compose exec -T server python -m demogen < demo/episodic.json;  docker compose exec -T server python -m demogen < demo/feature.json;
2023-10-27 09:13:00 INFO       Log collector initialized
2023-10-27 09:13:00 INFO       Connecting to database
2023-10-27 09:13:01 INFO       Deleting old project if exists
2023-10-27 09:13:01 INFO       Creating folders for project demo_Commercial
Traceback (most recent call last):
  File "/backend/ayon_server/entities/core/projectlevel.py", line 247, in save
    await transaction.execute(
  File "/usr/local/lib/python3.11/site-packages/asyncpg/connection.py", line 319, in execute
    _, status, _ = await self._execute(
                   ^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/asyncpg/connection.py", line 1658, in _execute
    result, _ = await self.__execute(
                ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/asyncpg/connection.py", line 1683, in __execute
    return await self._do_execute(
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/asyncpg/connection.py", line 1730, in _do_execute
    result = await executor(stmt, None)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "asyncpg/protocol/protocol.pyx", line 201, in bind_execute
asyncpg.exceptions.ForeignKeyViolationError: insert or update on table "workfiles" violates foreign key constraint "workfiles_created_by_fkey"
DETAIL:  Key (created_by)=(admin) is not present in table "users".

...

And there are also more errors

Thanks!

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

2 participants