Hello folks, I keep getting this error when trying to run a deployment in Prefect Cloud : ```Flow ...
a

Arnaud Stephan

about 1 year ago
Hello folks, I keep getting this error when trying to run a deployment in Prefect Cloud :
Flow could not be retrieved from deployment.
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/prefect/deployments/steps/core.py", line 154, in run_steps
    step_output = await run_step(step, upstream_outputs)
  File "/usr/local/lib/python3.10/site-packages/prefect/deployments/steps/core.py", line 125, in run_step
    result = await from_async.call_soon_in_new_thread(
  File "/usr/local/lib/python3.10/site-packages/prefect/_internal/concurrency/calls.py", line 327, in aresult
    return await asyncio.wrap_future(self.future)
  File "/usr/local/lib/python3.10/site-packages/prefect/_internal/concurrency/calls.py", line 352, in _run_sync
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.10/site-packages/prefect/utilities/asyncutils.py", line 311, in coroutine_wrapper
    return call()
  File "/usr/local/lib/python3.10/site-packages/prefect/_internal/concurrency/calls.py", line 432, in __call__
    return self.result()
  File "/usr/local/lib/python3.10/site-packages/prefect/_internal/concurrency/calls.py", line 318, in result
    return self.future.result(timeout=timeout)
  File "/usr/local/lib/python3.10/site-packages/prefect/_internal/concurrency/calls.py", line 179, in result
    return self.__get_result()
  File "/usr/local/lib/python3.10/concurrent/futures/_base.py", line 403, in __get_result
    raise self._exception
  File "/usr/local/lib/python3.10/site-packages/prefect/_internal/concurrency/calls.py", line 389, in _run_async
    result = await coro
  File "/usr/local/lib/python3.10/site-packages/prefect/deployments/steps/pull.py", line 123, in git_clone
    await storage.pull_code()
  File "/usr/local/lib/python3.10/site-packages/prefect/runner/storage.py", line 233, in pull_code
    await self._clone_repo()
  File "/usr/local/lib/python3.10/site-packages/prefect/runner/storage.py", line 241, in _clone_repo
    repository_url = self._repository_url_with_credentials
  File "/usr/local/lib/python3.10/site-packages/prefect/runner/storage.py", line 167, in _repository_url_with_credentials
    for k, v in credentials.items():
AttributeError: 'str' object has no attribute 'items'
I don't really know where the problem is coming from, as it seems to come from Prefect's modules and not something I wrote. Here is the .yaml of my deployment :
name: tenacy-prefect
prefect-version: 2.20.2

# build section allows you to manage and build docker images
build:

# push section allows you to manage if and how this project is uploaded to remote locations
push:

# pull section allows you to provide instructions for cloning this project in remote locations
pull:
- prefect.deployments.steps.git_clone:
    repository: <https://my-private-gitlab-instance.io/data/tenacy-prefect.git>
    credentials: '{{prefect.blocks.secret.gitlab-personal-token}}'


# the deployments section allows you to provide configuration for deploying flows
deployments:
- name: Younium
  version:
  tags: []
  description:
  entrypoint: flows/flows.py:younium_flow
  parameters: {}
  work_pool:
    name: tenacy-work-pool
    work_queue_name:
    job_variables: {}
  schedules: []