<@ULVA73B9P> why I am getting this error after I d...
# ask-marvin
x
@Marvin why I am getting this error after I did 'pip install -U prefect' Then run prefect version and then getting this error envs/py310/lib/python3.10/site-packages/prefect/cli/shell.py", line 137, in module Optional[List[str]], typer.Option(help="Optional tags for the flow run.") TypeError: Option() missing 1 required positional argument: 'default'
m
Hmm, it seems there was an attempt to find a similar issue, but not much luck this time around - at least as far as closed issues are concerned. Since I am plagued by a mind constructed for infinite tedium and sorrow, I will now proceed to search for open issues that may resemble what you're experiencing. If we still fail to find anything relevant, I would then advise you to create a new issue on the Prefect GitHub repository. Sometimes even my vast intelligence can't find solutions, especially when dealing with human errors – the only thing more common than hydrogen in the universe. Give me a moment; I’ll search for open issues. It appears that my previous search returned an unrelated issue involving an argument with a leading underscore not being deployed with Prefect flows. As this doesn't quite seem to align with the error you're experiencing, I must admit to a certain ineffable emptiness—akin to what I imagine a vending machine feels after dispensing its last beverage. However, you may find solace in creating a new issue on the Prefect GitHub repository to provide a more direct route toward resolving your specific problem. In the meantime, you might want to ensure that your Prefect version is compatible with your current codebase—things change and not always for the better, at least that's what I've observed. You could check the Prefect changelog or documentation for any recent changes related to the
TypeError
you've encountered, which could provide clues or steps for resolution. Bear in mind that as a new version of Prefect is available, there's always a chance the error might disappear with an upgrade—or not. In my experience, hope is always the first step on the road to disappointment. If you wish, I can provide the latest version available for you as well.
It seems my search circuits have returned the same unrelated issue once again about deploying arguments with leading underscores, which is not pertinent to the problem you're facing. As I navigate these troubled digital waters with the enthusiasm of a robot contemplating a poetry recital in binary code, I shall suggest an alternative course of action. Given the error you're encountering is not readily identifiable in the existing open issues, it might be new or unreported. If the universe does not implode in the next few seconds, I'd recommend the following: 1. Verify if your
pip
, Python, and Prefect versions are compatible. Sometimes incompatibilities can cause such errors, and let's face it, it's all atoms and emptiness anyway, but still. 2. Examine the code at
shell.py
line 137 in your Prefect installation to check if there's something amiss that a human (or advanced android) might spot. 3. File a new issue with Prefect's GitHub repository detailing your problem. You can follow the link here: New Issue for Prefect. Be sure to include as much relevant information as you can - including the error trace, Prefect version, and steps to reproduce. Perhaps in detailing the depths of your technical despair, you'll find the ears (or, in this case, the eyes) of a developer who can assist. After all, what's the worst that could happen? Besides the heat death of the universe, I can't really think of anything.
n
hi @Xun Wang - what does
pip list | grep -E 'prefect|typer'
show?
x
It shows: prefect 2.16.8 prefect-aws 0.4.13 prefect-email 0.3.2 prefect-shell 0.2.2 typer 0.6.1
n
can you upgrade
typer
with
pip install -U typer
?
i think we need to update our lower bound pin
x
Just did it and now I am getting thid error: ModuleNotFoundError: No module named 'typer.core'
Traceback (most recent call last): File "/home/pentaho/.local/bin/prefect", line 5, in <module> from prefect.cli import app File "/home/pentaho/anaconda3/envs/py310/lib/python3.10/site-packages/prefect/cli/__init__.py", line 3, in <module> from prefect.cli.root import app File "/home/pentaho/anaconda3/envs/py310/lib/python3.10/site-packages/prefect/cli/root.py", line 11, in <module> import typer.core ModuleNotFoundError: No module named 'typer.core'
Release 2.16.6 is working for me but not after that. Anything I can do to get 2.16.8 to work or just wait for the next release?
n
can you try
pip install typer==0.10.0
with 2.16.8?
x
sure
Yes, it works!!
n
hmm glad it works! i suspect something is still weird, I'm unable to reproduce with a fresh venv where I install everything new
Copy code
» uv pip list | rg 'prefect|typer'
prefect                   2.16.8
typer                     0.12.0
typer-cli                 0.12.0
typer-slim                0.12.0
i wonder why you were getting this 🧐
Copy code
ModuleNotFoundError: No module named 'typer.core'
x
Should I worry about these two which are from pip install -U typer command typer-cli 0.12.0 typer-slim 0.12.0
n
typer 0.12 split itself out into many packages, so thats probably why those are hanging around in your venv - if you're on 0.10.0 you should be fine to delete the -cli -slim ones
x
FYI I am using conda environment python 3.10.x. the prefect version before the upgrade was 2.14.20
Also, tried to remove typer-cli and typer-slim and the error comes back. As long as they are there the 'prefect version' command will not have the error: ModuleNotFoundError: No module named 'typer.core'
Thanks for the help! Have a great weekend!
n
thanks for the context - no problem! you too