Anyone else facing this error with prefects latest...
# marvin-ai
m
Anyone else facing this error with prefects latest release of 3.0.0. My controlflow library is also fully updated. The same code is working fine with the pre-release version of prefect 3.
Copy code
Traceback (most recent call last):
  File "/Users/ali/Documents/projects/market-researcher/test.py", line 49, in <module>
    from market_researcher import MarketResearcher
  File "/Users/ali/Documents/projects/market-researcher/src/market_researcher/market_researcher.py", line 4, in <module>
    from main import research_topic
  File "/Users/ali/Documents/projects/market-researcher/src/market_researcher/main.py", line 1, in <module>
    import controlflow as cf
  File "/Users/ali/Library/Caches/pypoetry/virtualenvs/market-researcher-LxA9ZOSo-py3.12/lib/python3.12/site-packages/controlflow/__init__.py", line 5, in <module>
    from .agents import Agent
  File "/Users/ali/Library/Caches/pypoetry/virtualenvs/market-researcher-LxA9ZOSo-py3.12/lib/python3.12/site-packages/controlflow/agents/__init__.py", line 1, in <module>
    from . import memory
  File "/Users/ali/Library/Caches/pypoetry/virtualenvs/market-researcher-LxA9ZOSo-py3.12/lib/python3.12/site-packages/controlflow/agents/memory.py", line 7, in <module>
    from controlflow.tools import Tool
  File "/Users/ali/Library/Caches/pypoetry/virtualenvs/market-researcher-LxA9ZOSo-py3.12/lib/python3.12/site-packages/controlflow/tools/__init__.py", line 1, in <module>
    from controlflow.llm.tools import tool, Tool, as_tools
  File "/Users/ali/Library/Caches/pypoetry/virtualenvs/market-researcher-LxA9ZOSo-py3.12/lib/python3.12/site-packages/controlflow/llm/__init__.py", line 1, in <module>
    from controlflow.llm import models, messages, tools, handlers, completions, rules
  File "/Users/ali/Library/Caches/pypoetry/virtualenvs/market-researcher-LxA9ZOSo-py3.12/lib/python3.12/site-packages/controlflow/llm/tools.py", line 16, in <module>
    from controlflow.utilities.prefect import create_markdown_artifact, prefect_task
  File "/Users/ali/Library/Caches/pypoetry/virtualenvs/market-researcher-LxA9ZOSo-py3.12/lib/python3.12/site-packages/controlflow/utilities/prefect.py", line 22, in <module>
    from prefect.results import ResultFactory
ImportError: cannot import name 'ResultFactory' from 'prefect.results' (/Users/ali/Library/Caches/pypoetry/virtualenvs/market-researcher-LxA9ZOSo-py3.12/lib/python3.12/site-packages/prefect/results.py). Did you mean: 'ResultRecord'?
a
Hey @Muhammad Ali Buttar! I haven't seen this pop up yet. @alex did this get moved around?
a
Yeah,
ResultFactory
was renamed to
ResultStore
just before 3.0 went GA
m
Hey guys, I posted this to GitHub issues as well. I was digging around the code. It doesn't seem like a simple rename of the ResultFactory as one of the functions being used downstream also doesn't exist in the newer version. Hoping for a fix soon. Thanks
a
🙇 - thanks @Muhammad Ali Buttar!
m
My Pleasure 🙂
j
Hotfix is released as CF 0.8.3!
m
Awesome. Thanks guys. I just updated the deps and it is working now