ImportError when running flask run on finesse-backend
- Lingua principale
- Jupyter Notebook
- Stelle
- 1
- Fork
- 0
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
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:
1. Clone the finesse-backend repository.
1. Set up the repository by following the `INSTALLATION.md` protocol.
1. Run `flask run` in the terminal.
### Error log:
```Bash
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
from app import app
File "C:\Users\Ibrahim Kabir\ACIA\finesse-backend\app\__init__.py", line 5, in
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
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
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
import psycopg
File "C:\Users\Ibrahim Kabir\ACIA\finesse-backend\venv\Lib\site-packages\psycopg\__init__.py", line 9, in
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
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.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Valutazione
Questa issue non è ancora stata valutata.