Looks like typer (a prefect dependency) released <...
# ask-community
m
Looks like typer (a prefect dependency) released breaking changes earlier this week which break the default prefect installation. Might be worth pinning the typer version to
==0.10.0
to prevent this bug.
m
Thanks Nate, I shouldve checked there
n
👍
m
Wait hang on
That's no good
That's updated to >= 0.10
It has to be <= 0.10.0
n
oh you linked 0.11
0.10 had breaking changes as well
m
I don't think it did 0.10 was just a small bug fix, I'm running it successfully in the background now
n
i dont have issues with newest typer now - can you describe what issues you're seeing?
m
It was a module import issues
import typer.core
no longer exists
Maybe
0.11.0
is valid then, but
0.12.0
must be breaking again in that case
Was just released 2 days ago
I'm going to post on that PR suggesting we just pin to 0.10.0 for now
To prevent further breaking changes
Oh that's you who made the PR lol, I thought it was someone else
👍 1
n
can you provide an MRE? i have no issues with everything new installed
Copy code
(prefect) nate :: ~/github.com/prefecthq/prefect ‹main›
» prefect version
Version:             2.16.8
API version:         0.8.4
Python version:      3.12.2
Git commit:          11cb641c
Built:               Fri, Mar 29, 2024 11:01 AM
OS/Arch:             darwin/arm64
Profile:             pong
Server type:         cloud

» uv pip list | rg 'prefect|typer'
prefect                    2.16.8
typer                      0.12.0
typer-cli                  0.12.0
typer-slim                 0.12.0
we typically like to avoid upper bound pins when possible, since it makes resolving dependencies much harder in many cases
m
Sorry my mistake, I must have been using 0.11.0 before
It works fine
👍 1
n
ah well actually, yeah i see it with certain command groups
Copy code
» prefect deployment ls
Traceback (most recent call last):
  File "/Users/nate/github.com/prefecthq/prefect/.venv/bin/prefect", line 5, in <module>
    from prefect.cli import app
  File "/Users/nate/github.com/prefecthq/prefect/.venv/lib/python3.12/site-packages/prefect/cli/__init__.py", line 3, in <module>
    from prefect.cli.root import app
  File "/Users/nate/github.com/prefecthq/prefect/.venv/lib/python3.12/site-packages/prefect/cli/root.py", line 11, in <module>
    import typer.core
ModuleNotFoundError: No module named 'typer.core'

» uv pip list | rg 'prefect|typer'                                                                                                                                                     1 ↵
prefect                    2.16.8
typer                      0.12.0
typer-cli                  0.12.0
typer-slim                 0.12.0
ill open an PR to fix the problem, upper bound pins just kick the problem down the road 😄
m
Oh oof I shouldve tried the command I was using before
Thanks for sanity checking there Nate
n
we'll discuss implementing a more conservative pin for
typer
since this has happened twice recently
🫡 1
b
Hey guys, just started running into this error. Any update on the current status of the
typer
issues? I tried adding a temporary pin for
type==0.11.1
and that seems to have resolved my issues (with prefect 2.16.8).
n
the fix is in
main
and will go out with next release, we are discussing pins for typer since their releases have caused recent similar issues
👍 4
l
Hi, we are also having issues with typer 0.12.0 with the error
ModuleNotFoundError: No module named 'typer.core'
and prefect 2.16.8. Downgrading typer to 0.11.1 worked