Skip to content

~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.

fix: add missing static route and fix importlib_resources import

hashedviking1c8238c3564b
diff --git a/src/local_deep_research/web/routes/research_routes.py b/src/local_deep_research/web/routes/research_routes.py
index 3f57fc5e72..ceccffc6c5 100644
--- a/src/local_deep_research/web/routes/research_routes.py
+++ b/src/local_deep_research/web/routes/research_routes.py
@@ -3,8 +3,9 @@ import traceback
from datetime import datetime
import json
import os
+from importlib import resources as importlib_resources
-from flask import Blueprint, render_template, request, jsonify, make_response, redirect, url_for
+from flask import Blueprint, render_template, request, jsonify, make_response, redirect, url_for, send_from_directory
from flask_socketio import emit
from ..models.database import init_db, add_log_to_db, get_logs_for_research, calculate_duration
@@ -39,6 +40,20 @@ def get_globals():
def index():
return render_template("pages/research.html")
+# Add the missing static file serving route
+@research_bp.route("/static/<path:path>")
+def serve_static(path):
+ """Serve static files for the research blueprint"""
+ try:
+ PACKAGE_DIR = importlib_resources.files("src.local_deep_research") / "web"
+ with importlib_resources.as_file(PACKAGE_DIR) as package_dir:
+ static_dir = package_dir / "static"
+ return send_from_directory(static_dir, path)
+ except Exception as e:
+ print(f"Error serving static file: {e}")
+ # Fallback to regular static path
+ return send_from_directory("static", path)
+
@research_bp.route("/progress/<int:research_id>")
def progress_page(research_id):
"""Render the research progress page"""