Skip to content

[BUG] Missing requirements for fastapi_server_docker example #556

@AbdelRahmanYaghi

Description

@AbdelRahmanYaghi

Describe the bug
When running cocoindex setup main.py, it return an error stating:

Error: Failed importing file '/home/ayaghi/cocoindex/examples/fastapi_server_docker/main.py': no pq wrapper available.
Attempts made:
- couldn't import psycopg 'c' implementation: No module named 'psycopg_c'
- couldn't import psycopg 'binary' implementation: No module named 'psycopg_binary'
- couldn't import psycopg 'python' implementation: libpq library not found

To Reproduce

SETUP: Run pg17 docker on the correct port.

  1. Go to the example dir: cd examples/fastapi_server_docker
  2. Create a virtual env: uv venv
  3. Activate the virtual env: source .venv/bin/activate
  4. Install requirements: uv pip install -r requirments.txt
  5. Run: cocoindex setup main.py

Expected behavior
Data getting indexed.

CocoIndex Version
Latest: 0.1.44

Additional context

  • The same does not happen when running from docker. Meaning it runs successfully when running from Docker.
  • Running from WSL 2 on Ubuntu

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions