https://prefect.io logo
#prefect-community
Title
# prefect-community
s

Scott White

02/28/2022, 10:59 PM
Getting a bizarre error when creating a project with the CLI. The referenced project (
veg_management
) was recently deleted with
prefect delete project veg_management
because I had some old flows in there I wanted to clean-up. But now when I attempt to recreate it I get the errors below. Note that if I change the name of the project (e.g.
veg_management_
) then it works.
k

Kevin Kho

02/28/2022, 11:01 PM
Hey @Scott White, could we move the traceback to the thread to keep the main channel neater? This behavior is because Prefect deletes are soft and batched up and executed after a certain time interval. The soft delete removes it from the UI, but not from our database so if you immediately try to create a project with the same name, you will get the uniqueness violation
s

Scott White

02/28/2022, 11:02 PM
Copy code
$ prefect create project veg_management
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/prefect/client/client.py", line 1069, in create_project
    tenant_id=self.tenant_id,
  File "/usr/local/lib/python3.7/dist-packages/prefect/client/client.py", line 473, in graphql
    raise ClientError(result["errors"])
prefect.exceptions.ClientError: [{'path': ['create_project'], 'message': 'Uniqueness violation.', 'extensions': {'code': 'INTERNAL_SERVER_ERROR'}}]
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/usr/local/bin/prefect", line 8, in <module>
    sys.exit(cli())
  File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/prefect/cli/create.py", line 71, in project
    Client().create_project(project_name=name, project_description=description)
  File "/usr/local/lib/python3.7/dist-packages/prefect/client/client.py", line 1083, in create_project
    return res.data.project[0].id
  File "/usr/local/lib/python3.7/dist-packages/box/box_list.py", line 68, in __getitem__
    return super(BoxList, self).__getitem__(item)
IndexError: list index out of range
k

Kevin Kho

02/28/2022, 11:02 PM
Thank you!
s

Scott White

02/28/2022, 11:02 PM
And thank you for your response, I will try again tomorrow
2 Views