diff --git a/README.md b/README.md index 7cb73075..90a07fd8 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,29 @@ samples and associated test results. An installation guideline can be found here: [installation guide](install/installation.md). +### Windows Setup Troubleshooting + +If you are setting up the platform on Windows, you may encounter environment-specific blockers. Use the following fixes to stabilize your build: + +#### 1. libmagic ImportError +The `python-magic` library requires native C-dependencies. On Windows, the standard package often fails to locate `magic.dll`. +* **Fix:** + ```powershell + pip uninstall python-magic + pip install python-magic-bin + ``` +#### 2. MySQL Driver Configuration +To ensure `SQLAlchemy` communicates correctly with a local MySQL instance on Windows, use the `pymysql` driver dialect in your `config.py`. +* **Fix:** Update your `DATABASE_URI` string as follows: + `DATABASE_URI = 'mysql+pymysql://user:password@localhost/db_name'` + +#### 3. Environment Variables (PowerShell) +The `flask db` commands require the `FLASK_APP` variable to be set. In PowerShell, the standard `export` command will not work. +* **Fix:** + ```powershell + $env:FLASK_APP = "run.py" + ``` + ## Sample Updates A lot of times it may happen that we add new features to ccextractor which render the result files associated with diff --git a/install/installation.md b/install/installation.md index 0b577cec..cb85c879 100644 --- a/install/installation.md +++ b/install/installation.md @@ -7,6 +7,10 @@ * MySQL * Pure-FTPD with mysql (optional, only needed for FTP file uploads) +## Note for Windows Environments + +Developing on Windows requires the `python-magic-bin` package and the `pymysql` driver for SQLAlchemy. Detailed steps for resolving these specific environment blockers, including PowerShell variable syntax, are documented in the [Windows Setup Troubleshooting](../README.md#windows-setup-troubleshooting) section of the main README. + ## Configuring Google Cloud Platform To configure the GCP for the platform, see [the installation guide](ci-vm/installation.md).