<@ULVA73B9P> after Updating prefect (3.6.16 -&gt; ...
# ask-marvin
f
@Marvin after Updating prefect (3.6.16 -> 3.6.17), I have some errors with griffe dependency : from prefect.blocks.core import Block ../../../Library/Caches/pypoetry/virtualenvs/iguazu-zSPJHTsc-py3.14/lib/python3.14/site-packages/prefect/blocks/__init__.py3 in <module> import prefect.blocks.notifications as notifications ../../../Library/Caches/pypoetry/virtualenvs/iguazu-zSPJHTsc-py3.14/lib/python3.14/site-packages/prefect/blocks/notifications.py12 in <module> from prefect.blocks.abstract import NotificationBlock, NotificationError ../../../Library/Caches/pypoetry/virtualenvs/iguazu-zSPJHTsc-py3.14/lib/python3.14/site-packages/prefect/blocks/abstract.py20 in <module> from prefect.blocks.core import Block ../../../Library/Caches/pypoetry/virtualenvs/iguazu-zSPJHTsc-py3.14/lib/python3.14/site-packages/prefect/blocks/core.py27 in <module> from griffe import Docstring, DocstringSection, DocstringSectionKind, Parser, parse E ModuleNotFoundError: No module named 'griffe'
m
thought for 124.4 seconds
Thanks for the details. This error means
griffe
isn’t present in the environment that’s importing
prefect.blocks
. In Prefect 3.x,
griffe
is a core dependency used for parsing block docstrings/metadata, and 3.6.17 relaxed the upper bound to allow newer
griffe
versions — it did not remove it. So it should be installed automatically, but a resolver/cache/compatibility issue can leave it out. Likely causes - Poetry lock/cache didn’t refresh when you upgraded Prefect - Python version compatibility (your path shows py3.14). Prefect and/or griffe may not (yet) support 3.14, which can interfere with resolution Quick fixes to try 1) Refresh your Poetry lock and install
Copy code
poetry lock --refresh
poetry install
2) Explicitly add griffe (safe to do; matches Prefect’s requirement)
Copy code
poetry add "griffe>=0.49,<3"
3) Verify it’s present
Copy code
poetry show griffe
poetry run python -c "import griffe, prefect, sys; print('griffe ok', prefect.__version__, sys.version)"
4) If you’re on Python 3.14, try a supported version (e.g., 3.11 or 3.12). If 3.14 isn’t supported by
griffe
yet, Poetry may skip it or fail to resolve correctly. For Docker images (Poetry-managed) pushed to GAR - Rebuild the image after refreshing the lockfile or adding
griffe
- Push and redeploy so your workers pull the updated image If you need a temporary workaround while sorting the environment, you can pin Prefect back to 3.6.16 in your
pyproject.toml
, then run
poetry lock --refresh && poetry install
. If this persists, can you share: -
python -V
(inside the Poetry venv) -
poetry show prefect griffe
- Relevant bits of your
pyproject.toml
(dependencies section) I can then advise on the exact version constraints to use.