Hi all - what would be the best way to debug this?...
# ask-community
t
Hi all - what would be the best way to debug this? No code changes but allow of a sudden I get this when trying to redeploy:
Copy code
poetry run python [REDACTED]/poll_payment_response.py
Traceback (most recent call last):
  File "[REDACTED]s/poll_payment_response.py", line 82, in <module>
    poll_fintegrate_payment_responses.deploy(
  File "[REDACTED]/.venv/lib/python3.11/site-packages/prefect/utilities/asyncutils.py", line 392, in coroutine_wrapper
    return run_coro_as_sync(ctx_call())
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "[REDACTED]/.venv/lib/python3.11/site-packages/prefect/utilities/asyncutils.py", line 243, in run_coro_as_sync
    return call.result()
           ^^^^^^^^^^^^^
  File "[REDACTED]/.venv/lib/python3.11/site-packages/prefect/_internal/concurrency/calls.py", line 312, in result
    return self.future.result(timeout=timeout)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "[REDACTED]/.venv/lib/python3.11/site-packages/prefect/_internal/concurrency/calls.py", line 182, in result
    return self.__get_result()
           ^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/concurrent/futures/_base.py", line 401, in __get_result
    raise self._exception
  File "[REDACTED]/.venv/lib/python3.11/site-packages/prefect/_internal/concurrency/calls.py", line 383, in _run_async
    result = await coro
             ^^^^^^^^^^
  File "[REDACTED]/.venv/lib/python3.11/site-packages/prefect/utilities/asyncutils.py", line 225, in coroutine_wrapper
    return await task
           ^^^^^^^^^^
  File "[REDACTED]/.venv/lib/python3.11/site-packages/prefect/utilities/asyncutils.py", line 382, in ctx_call
    result = await async_fn(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "[REDACTED]/.venv/lib/python3.11/site-packages/prefect/flows.py", line 1169, in deploy
    work_pool = await client.read_work_pool(work_pool_name)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "[REDACTED]/.venv/lib/python3.11/site-packages/prefect/client/orchestration.py", line 2638, in read_work_pool
    response = await self._client.get(f"/work_pools/{work_pool_name}")
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "[REDACTED]/.venv/lib/python3.11/site-packages/httpx/_client.py", line 1814, in get
    return await self.request(
           ^^^^^^^^^^^^^^^^^^^
  File "[REDACTED]/.venv/lib/python3.11/site-packages/httpx/_client.py", line 1585, in request
    return await self.send(request, auth=auth, follow_redirects=follow_redirects)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "[REDACTED]/.venv/lib/python3.11/site-packages/prefect/client/base.py", line 361, in send
    response.raise_for_status()
  File "[REDACTED]/.venv/lib/python3.11/site-packages/prefect/client/base.py", line 174, in raise_for_status
    raise PrefectHTTPStatusError.from_httpx_error(exc) from exc.__cause__
prefect.exceptions.PrefectHTTPStatusError: Server error '500 Internal Server Error' for url 'https://[REDACTED]/api/work_pools/nexus-prefect-uat-worker-pool'
For more information check: <https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/500>
1
j
hey! This is a server side error related to something about your work pool. If you're self hosting prefect, I would check the server logs for. If you don't see any errors, you can try and set
PREFECT_LOGGING_SERVER_LEVEL = "DEBUG"
and then restart your server and see what is going on. If you're using prefect cloud I would create an issue because that means something is wrong on our end.
t
Thanks for the reply! @Jake Kaplan - you won't believe what it was.... i had forgot i had an HTTP_PROXY env var set - which meant I could not connect through Flycast. I spent a lot of today debugging this - only to realise how silly I am 😂
j
It always tends to be something like that 😅. Glad you were able to figure it out!
🙌 1