-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
When attempting to launch the application with flask run in the finesse-backend repository, an ImportError related to the psycopg
library is triggered. It is important to note that the finesse-backend
repository does not directly use psycopg
, but it imports the GitHub repository ailab-db, which does make use of this library.
How to reproduce the problem:
- Clone the finesse-backend repository.
- Set up the repository by following the
INSTALLATION.md
protocol. - Run
flask run
in the terminal.
Error log:
Ibrahim Kabir@Hignir-Laptop MINGW64 ~/ACIA/finesse-backend (27-swagger-doc)
$ python run.py
Traceback (most recent call last):
File "C:\Users\Ibrahim Kabir\ACIA\finesse-backend\run.py", line 1, in <module>
from app import app
File "C:\Users\Ibrahim Kabir\ACIA\finesse-backend\app\__init__.py", line 5, in <module>
app = create_app(configuration)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Ibrahim Kabir\ACIA\finesse-backend\app\app_creator.py", line 13, in create_app
from .blueprints.search import search_blueprint
File "C:\Users\Ibrahim Kabir\ACIA\finesse-backend\app\blueprints\search.py", line 6, in <module>
from app.ailab_db import DBError, ailab_db_search
File "C:\Users\Ibrahim Kabir\ACIA\finesse-backend\app\ailab_db\__init__.py", line 3, in <module>
from ailab.db import DBError, connect_db
File "C:\Users\Ibrahim Kabir\ACIA\finesse-backend\venv\Lib\site-packages\ailab\db\__init__.py", line 7, in <module>
import psycopg
File "C:\Users\Ibrahim Kabir\ACIA\finesse-backend\venv\Lib\site-packages\psycopg\__init__.py", line 9, in <module>
from . import pq # noqa: F401 import early to stabilize side effects
^^^^^^^^^^^^^^^^
File "C:\Users\Ibrahim Kabir\ACIA\finesse-backend\venv\Lib\site-packages\psycopg\pq\__init__.py", line 114, in <module>
import_from_libpq()
File "C:\Users\Ibrahim Kabir\ACIA\finesse-backend\venv\Lib\site-packages\psycopg\pq\__init__.py", line 106, in import_from_libpq
raise ImportError(
ImportError: 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
Tasks:
- Analyze the ailab-db repository to identify what's causing the problem.
- Implement a solution in the ailab-db repository to avoid the necessity for finesse-backend to download
psycopg
. - Test the implemented solution by reproducing the problem in finesse-backend after making the necessary adjustments.
Acceptance Criteria:
- Dependencies of ailab-db repository is reviewed.
- The implemented solution is tested, and finesse-backend successfully runs without the psycopg-related ImportError.
k-allagbe
Metadata
Metadata
Assignees
Labels
No labels