ucam-department-of-psychiatry / crate

Create and use de-identified research databases. Preprocess, extract text, anonymise/de-identify, link, apply natural language processing, query for research, manage consent for contact.
GNU General Public License v3.0
19 stars 8 forks source link

The installer fails with external research database connected via ODBC #159

Closed martinburchell closed 1 month ago

martinburchell commented 3 months ago

I'm not sure exactly what is required to cause this but an external research database connected via ODBC ends up with an invalid crateweb_local_settings.py where RESEARCH_DB_INFO is misconfigured. The installer stops with a stack trace.

I'm wondering if it would be better if the installer configured RESEARCH_DB_INFO for just the demo MySQL databases and left it empty for anything else. Then if we could make the Docker container for the web app start but have the web app check for an empty RESEARCH_DB_INFO and prevent the user from doing anything that required it until this was configured.

RudolfCardinal commented 3 months ago

Yes, error message definitely better than broken!

martinburchell commented 1 month ago

I think probably what happened was that the odbc_user.ini hadn't been set up correctly. It's hard for us to test this from the point of view of the Docker container before the Docker container exists. We do already state in the prompt given to the user during installation, that for external databases, they must exist and for ODBC the DSN must be defined in the odbc_user.ini. So I think the installer is working as intended.

I'm going to close this but we can revisit better sanity checking of external databases along with other improvements to the installer at a future date.

martinburchell commented 1 month ago

Reopening because I was testing this with the wrong configuration!