https://prefect.io logo
Title
k

kiran

09/22/2022, 8:29 PM
Is anyone else having trouble with their agent(s)? All of a sudden my agent is not running and when I try to do it again, I get: ``````
m

Mason Menges

09/22/2022, 8:32 PM
Hey @kiran I am currently able to start an agent without issue, what version of prefect are you running, are you starting the agent on a local machine or is it hosted somewhere?
Also would you be able to move the error into this thread, it helps the main channel stay a bit cleaner?
k

kiran

09/22/2022, 8:39 PM
❯ prefect agent start -q "my-queue-name"
Traceback (most recent call last):
  File "/home/user/.pyenv/versions/3.10.0/bin/prefect", line 5, in <module>
    from prefect.cli import app
  File "/home/user/.pyenv/versions/3.10.0/lib/python3.10/site-packages/prefect/__init__.py", line 26, in <module>
    from prefect.flows import flow, Flow
  File "/home/user/.pyenv/versions/3.10.0/lib/python3.10/site-packages/prefect/flows.py", line 36, in <module>
    from prefect.context import PrefectObjectRegistry, registry_from_script
  File "/home/user/.pyenv/versions/3.10.0/lib/python3.10/site-packages/prefect/context.py", line 33, in <module>
    from prefect.client import OrionClient
  File "/home/user/.pyenv/versions/3.10.0/lib/python3.10/site-packages/prefect/client.py", line 55, in <module>
    from prefect.orion.api.server import ORION_API_VERSION, create_app
  File "/home/user/.pyenv/versions/3.10.0/lib/python3.10/site-packages/prefect/orion/api/__init__.py", line 1, in <module>
    from . import (
  File "/home/user/.pyenv/versions/3.10.0/lib/python3.10/site-packages/prefect/orion/api/admin.py", line 9, in <module>
    from prefect.orion.database.dependencies import provide_database_interface
  File "/home/user/.pyenv/versions/3.10.0/lib/python3.10/site-packages/prefect/orion/database/dependencies.py", line 9, in <module>
    from prefect.orion.database.configurations import (
  File "/home/user/.pyenv/versions/3.10.0/lib/python3.10/site-packages/prefect/orion/database/configurations.py", line 8, in <module>
    from sqlalchemy.ext.asyncio import AsyncEngine, AsyncSession, create_async_engine
ModuleNotFoundError: No module named 'sqlalchemy.ext.asyncio'
Hi @Mason Menges I’m on prefect 2.4.0 running prefect on a remote linux server
Everything was working fine until a couple of days ago when the agent stopped
m

Mason Menges

09/22/2022, 9:01 PM
Hmm if you're running this in a virtual environment are you able to create a new venv and reinstall prefect there to see if that works correctly?
t

Taylor Curran

09/22/2022, 9:11 PM
Also have you damonized the agent? This tutorial uses systemd and might help.