https://prefect.io logo
Title
o

Oscar Björhn

09/23/2022, 8:25 AM
I just upgraded my venvs to 2.4.1 and I'm getting the following when I run any prefect command I've tested (--help, profile etc). Am I the only one with this issue? Might not be a Prefect problem, could be something in my venvs. Note that everything still appears to work, other than the annoying error messages. Edit: I moved the error message to later in the thread
j

jpuris

09/23/2022, 10:38 AM
Which python version are you using and can you replicate the behaviour with a fresh venv created from scratch?
o

Oscar Björhn

09/23/2022, 10:46 AM
3.8.9, it is a fresh venv created from scratch. 🙂
j

jpuris

09/23/2022, 11:01 AM
I’m not able to reproduce this with Python 3.10.6 or Python 3.8.14. edit: I’m on arm chip mac running latest macos.
o

Oscar Björhn

09/23/2022, 11:10 AM
Okay! Interesting. Unfortunately we can't easily upgrade due to another dependency currently but we should be able to within a couple of weeks. I will give it a go then. Everything seems to work fine other than the messages anyway. Thank you.
j

Justin Trautmann

09/23/2022, 11:41 AM
i'm experiencing the same issue with prefect 2.4.1 and python 3.8.10
k

Kamil Okáč

09/23/2022, 11:42 AM
I'm having the same problem in both Windows and Ubuntu WSL. Python 3.10.6 and Prefect==2.4.1
o

Oscar Björhn

09/23/2022, 11:51 AM
Oh, I'm also on Ubuntu 20.04 and wsl
t

Toby Rahloff

09/23/2022, 12:09 PM
Same here with Python 3.8 and Prefect==2.4.1 (Linux)
j

Jeff Hale

09/23/2022, 1:40 PM
Thank you for the reports. 🙂 Are you able to move the error message to the thread please, Oscar? Interesting, I’m not seeing issues in a Conda environment on M1 Mac Python 3.10, Prefect 2.4.1. Sounds like a bug. Are you able to open an issue Oscar or anyone else seeing? Please note the virtual environment manager - maybe this is a venv issue.
o

Oscar Björhn

09/23/2022, 1:48 PM
Error message:
(all) oz@computer:~/git/analytics$ prefect --help
Failed to parse annotation from 'Name' node: 'NoneType' object has no attribute 'resolve'
Failed to parse annotation from 'Name' node: 'NoneType' object has no attribute 'resolve'
etc...
Failed to parse annotation from 'Subscript' node: 'NoneType' object has no attribute 'resolve'
Failed to parse annotation from 'Name' node: 'NoneType' object has no attribute 'resolve'
Failed to parse annotation from 'Name' node: 'NoneType' object has no attribute 'resolve'
Failed to parse annotation from 'Subscript' node: 'NoneType' object has no attribute 'resolve'
Failed to parse annotation from 'Name' node: 'NoneType' object has no attribute 'resolve'
Failed to parse annotation from 'Name' node: 'NoneType' object has no attribute 'resolve'
Failed to parse annotation from 'Subscript' node: 'NoneType' object has no attribute 'resolve'

Usage: prefect [OPTIONS] COMMAND [ARGS]...
Rest of printout omitted
:plus-one: 1
:thank-you: 1
j

Josh Paulin

09/23/2022, 2:36 PM
After upgrading from 2.4.0 to 2.4.1 I’m seeing some of my unit tests failing with:
@inject_client
    async def create_then_begin_flow_run(
        flow: Flow,
        parameters: Dict[str, Any],
        return_type: EngineReturnType,
        client: OrionClient,
    ) -> Any:
        """
        Async entrypoint for flow calls
    
        Creates the flow run in the backend, then enters the main flow run engine.
        """
        # TODO: Returns a `State` depending on `return_type` and we can add an overload to
        #       the function signature to clarify this eventually.
    
>       connect_error = await client.api_healthcheck()
E       AttributeError: 'NoneType' object has no attribute 'api_healthcheck'
j

Jeff Hale

09/23/2022, 2:39 PM
Hi Josh. Thank you for raising. This looks like a different issue. Are you able to open a bug report in GitHub with the issue?
j

Josh Paulin

09/23/2022, 2:39 PM
sure thing
:thank-you: 1
q

Q

09/23/2022, 3:04 PM
Same thing after upgrading to 2.4.1, ubuntu 20.04, python 3.9.8, both w and w/o venv
PR that fixes this just got merged https://github.com/PrefectHQ/prefect/pull/6937
o

Oscar Björhn

09/23/2022, 3:38 PM
Awesome! 🎉
2.4.2 didn't actually fix the issue for me.. Did it improve things for anyone else?
k

Kevin Wang

09/26/2022, 3:28 PM
Same, the Prefect CLI works, but spits out a all those
Failed to parse
lines above
>prefect version
Failed to parse annotation from 'Name' node: 'NoneType' object has no attribute 'resolve'
Failed to parse annotation from 'Name' node: 'NoneType' object has no attribute 'resolve'
Failed to parse annotation from 'Name' node: 'NoneType' object has no attribute 'resolve'
Failed to parse annotation from 'Name' node: 'NoneType' object has no attribute 'resolve'
Failed to parse annotation from 'Name' node: 'NoneType' object has no attribute 'resolve'
Failed to parse annotation from 'Name' node: 'NoneType' object has no attribute 'resolve'
Failed to parse annotation from 'Name' node: 'NoneType' object has no attribute 'resolve'
Failed to parse annotation from 'Name' node: 'NoneType' object has no attribute 'resolve'
Failed to parse annotation from 'Name' node: 'NoneType' object has no attribute 'resolve'
Failed to parse annotation from 'Name' node: 'NoneType' object has no attribute 'resolve'
Failed to parse annotation from 'Name' node: 'NoneType' object has no attribute 'resolve'
Failed to parse annotation from 'Name' node: 'NoneType' object has no attribute 'resolve'
Failed to parse annotation from 'Name' node: 'NoneType' object has no attribute 'resolve'
Failed to parse annotation from 'Name' node: 'NoneType' object has no attribute 'resolve'
Failed to parse annotation from 'Subscript' node: 'NoneType' object has no attribute 'resolve'
Failed to parse annotation from 'Name' node: 'NoneType' object has no attribute 'resolve'
Failed to parse annotation from 'Name' node: 'NoneType' object has no attribute 'resolve'
Failed to parse annotation from 'Subscript' node: 'NoneType' object has no attribute 'resolve'
Failed to parse annotation from 'Name' node: 'NoneType' object has no attribute 'resolve'
Failed to parse annotation from 'Name' node: 'NoneType' object has no attribute 'resolve'
Failed to parse annotation from 'Subscript' node: 'NoneType' object has no attribute 'resolve'
Version:             2.4.2
API version:         0.8.0
Python version:      3.10.6
Git commit:          65807e84
Built:               Fri, Sep 23, 2022 10:43 AM
OS/Arch:             linux/x86_64
Profile:             default
Server type:         hosted
running the agent still works.. 🙂
j

Jeff Hale

09/26/2022, 8:43 PM
There’s an issue to track the warnings here.
o

Oscar Björhn

09/27/2022, 8:40 AM
Sorry about that Jeff, I missed the issue somehow when looking to see if it had been reported. Thanks!
👍 1
j

Jeff Hale

09/27/2022, 11:59 AM
No problem, Oscar. It’s a relatively new issue - just wanted to share it so folks could track it.