9. Dev Troubleshooting Guide#
This page helps you diagnose and resolve common issues encountered during Maeser development and usage.
9.1. Environment & Installation Issues#
9.1.1. Virtual Environment Activation#
Symptom:
pythonorpipcommands refer to system Python, not your.venv.Solution: Ensure you activate correctly:
macOS/Linux:
source .venv/bin/activateWindows PowerShell:
.venv\Scripts\Activate.ps1Verify with
which python(Unix),Get-Command python(Windows PowerShell), orwhere.exe python(Windows CMD). See also Check if the Virtual Environment is Active.
9.1.2. Dependency Conflicts#
Symptom:
pip install -e .fails, orModuleNotFoundErrorfor installed packages.Solution:
Remove and recreate
.venv:deactivate rm -rf .venv python3.10 -m venv .venv source .venv/bin/activate pip install -e .
Run
poetry lockthenpoetry install --all-extrasto re-install dependencies.
9.2. Configuration & API Key Problems#
9.2.1. Missing OpenAI API Key#
Symptom:
InvalidRequestErroror LLM calls fail silently.Solution:
For scripts that use
config.py(such as the examples inexample/apps/) verify that OpenAPI key is set inconfig.yaml, like so:OPENAI_API_KEY: "<your-key>"For scripts that do not use
config.py(such asexample/tools/embeddings_example.py), set your OpenAPI key as an environment variable. Linux/MacOS:# Set the environment variable $ export OPENAI_API_KEY="<your-key>" # Confirm it was properly assigned $ $echo $OPENAI_API_KEY <your-key>
Windows (Powershell):
# Set the environment variable PS> $Env:OPENAI_API_KEY = '<your-key>' # Confirm it was properly assigned PS> echo $Env:OPENAI_API_KEY <your-key>
9.2.2. Incorrect Paths in config.yaml#
Symptom:
FileNotFoundErrorfor vector stores or log directories.Solution:
Look for the following line in your terminal that prints when you start your Maeser application:
Using configuration at path/to/config.yaml (Priority 0)
Ensure that
path/to/config.yamlis the expected path for yourconfig.yamlfile. If the path is incorrect, openconfig.pyand ensure yourconfig.yamlfile is located at one of theconfig_paths.Verify the following fields point to existing locations:
vec_store_pathlog_source_pathchat_history_pathaccounts_db_path
9.3. Vector Store & Embedding Issues#
9.3.1. Empty or Irrelevant Retrievals#
Symptom: RAG returns unrelated or blank responses.
Solution:
In your
chat_logs/chat_history/, check thecontextfield in your chat logs and verify that context is being retrieved from your vector stores.If your application is using Universal RAG, the chatbot skip context retrieval if no vectorstores are relevant. Check the names of your vectorstores and make sure they are descriptive to their respective topics to ensure that they are properly retrieved.
Confirm your vector store directories are correct and contain
index.faissandindex.pklfiles.Check your embedding step (e.g. in your script for embedding new content):
from langchain.embeddings.openai import OpenAIEmbeddings embeddings = OpenAIEmbeddings()
Ensure embeddings have completed without errors.
Experiment with
chunk_size/chunk_overlapinRecursiveCharacterTextSplitter.
9.3.2. FAISS Index/Vector Store Load Failures#
Symptom: Errors loading FAISS index (
IOError,faissexceptions).Solution:
Ensure that your rag graphs (e.g.
get_universal_rag) are configured with the correct paths to your FAISS vector stores.Confirm directory permissions:
chmod -R u+rw <vectorstore_folder>.
9.4. Testing & Documentation Build Failures#
9.4.1. PyTest Errors#
Symptom:
pytest testsfails with import or assertion errors.Solution:
Ensure editable install:
pip install -e .Run pytests with verbose printing (on project root):
make testVerboseRun individual tests to isolate failures:
pytest tests/test_module.py::test_function
9.4.2. Sphinx Build Errors#
Symptom:
make htmlerrors on missing references or invalid syntax.Solution:
Confirm that your virtual environment is activated.
Install docs extras:
make deps(fromsphinx-docs/directory) orpoetry install --only devEnsure that all cross-references in your
.md/.rstfiles are correct.
9.4.3. Sphinx TOCTree Warnings#
Symptom: Building the documentation yields one or more warnings that say,
WARNING: document isn't included in any toctree.Solution:
Check
index.rstand make sure that the document has been included in the table of contents.
9.5. Flask & Web Interface Issues#
9.5.1. Server Won’t Start#
Symptom:
Address already in useorModuleNotFoundErrorfor controllers.Solution:
Change port: in
app.run(port=...).Verify
example/flask_example_user_management.pyuses correct imports and path.
9.5.2. Authentication Failures#
Symptom: GitHub OAuth redirect errors or LDAP bind failures.
Solution (GitHub):
In GitHub OAuth App settings, ensure that Homepage URL matches the url of your app and that Authorization callback URL matches
github_callback_uriinconfig.py.Check
github_client_idandgithub_client_secretare correct.
Solution (LDAP):
Verify LDAP URLs, base DN, and search filters in config.
Test binding with an LDAP client (e.g.,
ldapsearch).
9.6. WSL Troubleshooting#
9.6.1. WSL File Permissions#
Symptom: Permission denied when accessing Windows files.
Solution:
Use
chmodto grant permissions.If your project is set up in the Windows file system (
mnt/c/...), consider moving it to the Linux file system (~/projects/...). Be sure to runmake clean_venvandmake setupafter you do this to reconfigure your virtual environment.
9.7. Getting Help#
GitHub Issues: Check for issues on the Maeser repository or open a new one.
Community Contributions: Submit documentation fixes or feature requests via a Pull Request.