<@ULVA73B9P> I am currently testing a flow in my l...
# ask-marvin
g
@Marvin I am currently testing a flow in my local machine. This flow was smoothly working before, but after some package updates, and etc, I encountered a very weird error while trying to execute any prefect flow. To diagnose what’s going on, I was checking slack threads, and one of the suggestion I figured out was to check the prefect version. And surprisingly, while printing prefect version, I got exactly the same error I observed while running my flow before. It seems like there is some issue with my current prefect package? Here is the error log:
Copy code
(ENV_NAME) ➜  FOLDER_NAME git:(BRANCH_NAME) ✗ prefect version
Traceback (most recent call last):
  File "/Users/MYNAME/miniforge3/envs/ENV_NAME/lib/python3.9/site-packages/prefect/cli/_utilities.py", line 41, in wrapper
    return fn(*args, **kwargs)
  File "/Users/MYNAME/miniforge3/envs/ENV_NAME/lib/python3.9/site-packages/prefect/utilities/asyncutils.py", line 255, in coroutine_wrapper
    return call()
  File "/Users/MYNAME/miniforge3/envs/ENV_NAME/lib/python3.9/site-packages/prefect/_internal/concurrency/calls.py", line 398, in __call__
    return self.result()
  File "/Users/MYNAME/miniforge3/envs/ENV_NAME/lib/python3.9/site-packages/prefect/_internal/concurrency/calls.py", line 284, in result
    return self.future.result(timeout=timeout)
  File "/Users/MYNAME/miniforge3/envs/ENV_NAME/lib/python3.9/site-packages/prefect/_internal/concurrency/calls.py", line 168, in result
    return self.__get_result()
  File "/Users/MYNAME/miniforge3/envs/ENV_NAME/lib/python3.9/concurrent/futures/_base.py", line 391, in __get_result
    raise self._exception
  File "/Users/MYNAME/miniforge3/envs/ENV_NAME/lib/python3.9/site-packages/prefect/_internal/concurrency/calls.py", line 355, in _run_async
    result = await coro
  File "/Users/MYNAME/miniforge3/envs/ENV_NAME/lib/python3.9/site-packages/prefect/cli/root.py", line 110, in version
    from prefect.server.utilities.database import get_dialect
  File "/Users/MYNAME/miniforge3/envs/ENV_NAME/lib/python3.9/site-packages/prefect/server/__init__.py", line 1, in <module>
    from . import models, orchestration, schemas, services
  File "/Users/MYNAME/miniforge3/envs/ENV_NAME/lib/python3.9/site-packages/prefect/server/models/__init__.py", line 1, in <module>
    from . import (
  File "/Users/MYNAME/miniforge3/envs/ENV_NAME/lib/python3.9/site-packages/prefect/server/models/agents.py", line 13, in <module>
    from prefect.server.database.dependencies import inject_db
  File "/Users/MYNAME/miniforge3/envs/ENV_NAME/lib/python3.9/site-packages/prefect/server/database/dependencies.py", line 14, in <module>
    from prefect.server.database.interface import PrefectDBInterface
  File "/Users/MYNAME/miniforge3/envs/ENV_NAME/lib/python3.9/site-packages/prefect/server/database/interface.py", line 9, in <module>
    from prefect.server.database.query_components import BaseQueryComponents
  File "/Users/MYNAME/miniforge3/envs/ENV_NAME/lib/python3.9/site-packages/prefect/server/database/query_components.py", line 26, in <module>
    from prefect.server.schemas.graph import Edge, Graph, Node
  File "/Users/MYNAME/miniforge3/envs/ENV_NAME/lib/python3.9/site-packages/prefect/server/schemas/graph.py", line 13, in <module>
    class Node(PrefectBaseModel):
  File "pydantic/main.py", line 197, in pydantic.main.ModelMetaclass.__new__
  File "pydantic/fields.py", line 506, in pydantic.fields.ModelField.infer
  File "pydantic/fields.py", line 436, in pydantic.fields.ModelField.__init__
  File "pydantic/fields.py", line 552, in pydantic.fields.ModelField.prepare
  File "pydantic/fields.py", line 668, in pydantic.fields.ModelField._type_analysis
  File "/Users/MYNAME/miniforge3/envs/ENV_NAME/lib/python3.9/typing.py", line 852, in __subclasscheck__
    return issubclass(cls, self.__origin__)
TypeError: issubclass() arg 1 must be a class
An exception occurred.
Indeed,
Copy code
TypeError: issubclass() arg 1 must be a class
is what is constantly irritating me.
m
I found a couple of threads that might be related to your issue. 1. No class found for dispatch key s3 bucket in registry for type block working with deployments: This thread discusses a KeyError that occurs when no class is found for a dispatch key. Although it's not exactly the same as your error, it might provide some insight. 2. Why no task logs in prefect cloud: In this thread, a user was advised to upgrade to the latest Prefect version (2.10.3 at the time) to resolve their issue. It's hard to say for sure without more information, but your issue might be related to a compatibility problem with the Prefect version you're using. You could try upgrading to the latest version to see if that resolves the issue. If not, you might need to dig deeper into the error message and traceback to identify the root cause.