Hi there! Since earlier today I get a strange bug ...
# ask-community
y
Hi there! Since earlier today I get a strange bug when running the following commands:
Copy code
python3 -m pip install prefect==2.20.3
python3 -m prefect --version
This results in:
Copy code
Traceback (most recent call last):
  File "<frozen runpy>", line 189, in _run_module_as_main
  File "<frozen runpy>", line 148, in _get_module_details
  File "<frozen runpy>", line 112, in _get_module_details
  File "/workspace/.pyenv_mirror/user/current/lib/python3.11/site-packages/prefect/__init__.py", line 30, in <module>
    from prefect.deployments import deploy
  File "/workspace/.pyenv_mirror/user/current/lib/python3.11/site-packages/prefect/deployments/__init__.py", line 2, in <module>
    import prefect.deployments.steps
  File "/workspace/.pyenv_mirror/user/current/lib/python3.11/site-packages/prefect/deployments/steps/__init__.py", line 2, in <module>
    from .pull import (
  File "/workspace/.pyenv_mirror/user/current/lib/python3.11/site-packages/prefect/deployments/steps/pull.py", line 9, in <module>
    from prefect.blocks.core import Block
  File "/workspace/.pyenv_mirror/user/current/lib/python3.11/site-packages/prefect/blocks/__init__.py", line 3, in <module>
    import prefect.blocks.notifications
  File "/workspace/.pyenv_mirror/user/current/lib/python3.11/site-packages/prefect/blocks/notifications.py", line 15, in <module>
    from prefect.blocks.abstract import NotificationBlock, NotificationError
  File "/workspace/.pyenv_mirror/user/current/lib/python3.11/site-packages/prefect/blocks/abstract.py", line 20, in <module>
    from prefect.blocks.core import Block
  File "/workspace/.pyenv_mirror/user/current/lib/python3.11/site-packages/prefect/blocks/core.py", line 44, in <module>
    from prefect.events.instrument import (
  File "/workspace/.pyenv_mirror/user/current/lib/python3.11/site-packages/prefect/events/__init__.py", line 45, in <module>
    from .clients import get_events_client, get_events_subscriber
  File "/workspace/.pyenv_mirror/user/current/lib/python3.11/site-packages/prefect/events/clients.py", line 31, in <module>
    from prefect.client.base import PrefectHttpxAsyncClient
  File "/workspace/.pyenv_mirror/user/current/lib/python3.11/site-packages/prefect/client/base.py", line 29, in <module>
    from prefect._vendor.starlette.testclient import TestClient
  File "/workspace/.pyenv_mirror/user/current/lib/python3.11/site-packages/prefect/_vendor/starlette/testclient.py", line 363, in <module>
    class TestClient(httpx.Client):
  File "/workspace/.pyenv_mirror/user/current/lib/python3.11/site-packages/prefect/_vendor/starlette/testclient.py", line 445, in TestClient
    url: httpx._types.URLTypes,
         ^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'httpx._types' has no attribute 'URLTypes'
My Python version 3.11.4
👆 1
j
I'm getting the same error in a github workflow with python 3.11 and prefect 2.20.3. Did you figure out the culprit?
y
@Joe D Unfortunately not. I get this for the PrefectHQ/actions-prefect-auth@v1 GitHub action and when installing Prefect manually. This is very strange because 10 hours ago or so this still worked without any problems.
j
Hmm yep
prefect cloud login
in my workflow is resulting in that error, and it also ran fine yesterday 🫠
It looks like in my workflow env httpx went from
0.27.0
->
0.27.1
between succesful and unsuccesful runs
y
That appears to be the problem. I just tested
pip install httpx==0.27.0
and that resolves the error at least locally.
👍 1
There was this release for httpx earlier today. Now it seems to be working as expected again.
🙏 1
🧷 1