Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] When Docker-Compose Up arizephoenix/phoenix:latest container error : ModuleNotFoundError: No module named 'psycopg2' #4301

Closed
mhrsavci opened this issue Aug 21, 2024 · 3 comments · Fixed by #4304
Assignees
Labels
bug Something isn't working c/server Server implementation

Comments

@mhrsavci
Copy link

mhrsavci commented Aug 21, 2024

My docker-compose.yaml looks like :

  phoenix:
    image: arizephoenix/phoenix:latest
    depends_on:
      - db
    ports:
      - 6006:6006
      - 4317:4317
    environment:
      - PHOENIX_SQL_DATABASE_URL=postgresql://postgres:postgres@db:5432/postgres
  db:
    image: postgres
    restart: always
    environment:
      - POSTGRES_USER=postgres
      - POSTGRES_PASSWORD=postgres
      - POSTGRES_DB=postgres
    ports:
      - 5432
    volumes:
      - database_data:/var/lib/postgresql/data
volumes:
  database_data:
    driver: local```
@mhrsavci mhrsavci added bug Something isn't working triage issues that need triage labels Aug 21, 2024
@dosubot dosubot bot added the c/server Server implementation label Aug 21, 2024
@glmourad
Copy link

glmourad commented Aug 21, 2024

This is happening with latest tag, version-4.25.0

phoenix-1 | INFO:main:Server umap params: UMAPParameters(min_dist=0.0, n_neighbors=30, n_samples=500)
phoenix-1 | Traceback (most recent call last):
phoenix-1 | File "", line 198, in _run_module_as_main
phoenix-1 | File "", line 88, in _run_code
phoenix-1 | File "/phoenix/env/phoenix/server/main.py", line 260, in
phoenix-1 | engine = create_engine_and_run_migrations(db_connection_str)
phoenix-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
phoenix-1 | File "/phoenix/env/phoenix/server/app.py", line 378, in create_engine_and_run_migrations
phoenix-1 | return create_engine(database_url)
phoenix-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
phoenix-1 | File "/phoenix/env/phoenix/db/engines.py", line 79, in create_engine
phoenix-1 | return aio_postgresql_engine(url=url, migrate=migrate, echo=echo)
phoenix-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
phoenix-1 | File "/phoenix/env/phoenix/db/engines.py", line 141, in aio_postgresql_engine
phoenix-1 | sync_engine = sqlalchemy.create_engine(
phoenix-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^
phoenix-1 | File "", line 2, in create_engine
phoenix-1 | File "/phoenix/env/sqlalchemy/util/deprecations.py", line 281, in warned
phoenix-1 | return fn(*args, **kwargs) # type: ignore[no-any-return]
phoenix-1 | ^^^^^^^^^^^^^^^^^^^
phoenix-1 | File "/phoenix/env/sqlalchemy/engine/create.py", line 599, in create_engine
phoenix-1 | dbapi = dbapi_meth(**dbapi_args)
phoenix-1 | ^^^^^^^^^^^^^^^^^^^^^^^^
phoenix-1 | File "/phoenix/env/sqlalchemy/dialects/postgresql/psycopg2.py", line 690, in import_dbapi
phoenix-1 | import psycopg2
phoenix-1 | ModuleNotFoundError: No module named 'psycopg2'

@mikeldking
Copy link
Contributor

Thanks for reporting this @glmourad @mhrsavci - we will get this fixed. In the meantime maybe pin to an earlier version that works. Apologies for the bug.

@RogerHYang
Copy link
Contributor

This is fixed in 4.26.0. Please try again. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working c/server Server implementation
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants