ZhuLinsen/daily_stock_analysis · error · IntelligenceServiceError
unsupported market: {market}
Error message
unsupported market: {market} What it means
Error "unsupported market: {market}" thrown in ZhuLinsen/daily_stock_analysis.
Source
Thrown at src/services/intelligence_service.py:380
url = str(payload.get("url") or "").strip()
source_type = str(payload.get("source_type") or "rss").strip().lower()
scope_type = str(payload.get("scope_type") or "market").strip().lower()
scope_value = str(payload.get("scope_value") or "").strip() or None
market = str(payload.get("market") or "cn").strip().lower()
enabled = bool(payload.get("enabled", True))
description = str(payload.get("description") or "").strip() or None
if not name:
raise IntelligenceServiceError("source name is required")
if not url:
raise IntelligenceServiceError("source url is required")
if source_type not in _ALLOWED_SOURCE_TYPES:
raise IntelligenceServiceError(f"unsupported source_type: {source_type}")
if scope_type not in _ALLOWED_SCOPE_TYPES:
raise IntelligenceServiceError(f"unsupported scope_type: {scope_type}")
if scope_type in {"symbol", "sector"} and not scope_value:
raise IntelligenceServiceError(f"scope_value is required when scope_type={scope_type}")
if market not in _ALLOWED_MARKETS:
raise IntelligenceServiceError(f"unsupported market: {market}")
return {
"name": name[:100],
"source_type": source_type,
"url": url,
"enabled": enabled,
"scope_type": scope_type,
"scope_value": scope_value[:64] if scope_value else None,
"market": market,
"description": description,
}
def _validate_url(self, raw_url: str, *, allow_no_url: bool = False) -> None:
if allow_no_url and raw_url.startswith("no-url:intel:"):
return
parsed = urlparse(raw_url)
if parsed.scheme.lower() not in {"http", "https"} or not parsed.netloc:
raise IntelligenceServiceError("source url must be an absolute http(s) URL")
if parsed.username or parsed.password:View on GitHub (pinned to 5159bd72e8)
Solutions
- Use a supported market value such as cn, hk, or us.
- Fix the client/request to send one of the documented market codes.
- Check for typos or unsupported region codes in the request.
When it happens
Trigger: Thrown at src/services/intelligence_service.py:380 when the library encounters an invalid state.
Common situations: Raised when an intelligence source is scoped to an unsupported market; occurs when the market value is not one of the supported cn/hk/us/etc. codes.
AI-assisted analysis of ZhuLinsen/daily_stock_analysis@5159bd72e8 (2026-08-15).
Data as JSON: /api/errors/d5bb6822ef4b625f.
Report an issue: GitHub.