fix(seo-audit): Fix SEOAuditor import path after migration to scripts/
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
The import was looking for 'seo_audit_service' module which no longer exists. The SEOAuditor class lives in scripts/seo_audit.py. Fixed to use sys.path like routes_social_audit.py does. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
51b9176c10
commit
7205279434
@ -6,7 +6,9 @@ Contains API routes for SEO audit functionality.
|
||||
"""
|
||||
|
||||
import logging
|
||||
import sys
|
||||
from datetime import datetime
|
||||
from pathlib import Path
|
||||
|
||||
from flask import jsonify, request, current_app
|
||||
from flask_login import current_user, login_required
|
||||
@ -19,10 +21,14 @@ logger = logging.getLogger(__name__)
|
||||
|
||||
# Check if SEO audit service is available
|
||||
try:
|
||||
from seo_audit_service import SEOAuditor
|
||||
scripts_dir = Path(__file__).parent.parent.parent / 'scripts'
|
||||
if str(scripts_dir) not in sys.path:
|
||||
sys.path.insert(0, str(scripts_dir))
|
||||
from seo_audit import SEOAuditor
|
||||
SEO_AUDIT_AVAILABLE = True
|
||||
SEO_AUDIT_VERSION = '2.0'
|
||||
except ImportError:
|
||||
except ImportError as e:
|
||||
logger.warning(f"SEO audit service not available: {e}")
|
||||
SEO_AUDIT_AVAILABLE = False
|
||||
SEO_AUDIT_VERSION = None
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user