Frequently Asked Questions
This document compiles common issues encountered by users and their solutions.
Source Installation
Section titled “Source Installation”Windows dependency installation fails on long paths
Section titled “Windows dependency installation fails on long paths”If pip install -r requirements.txt raises OSError: [Errno 2] for a file under .venv\Lib\site-packages\litellm\ and mentions Windows long-path support, the full install path may exceed the Windows path-length limit.
Clone or extract a fresh copy of the project into a short, writable directory such as C:\dsa. From that directory, use PowerShell to create a new virtual environment and reinstall the dependencies.
python -m venv .venv.\.venv\Scripts\python.exe -m pip install -r requirements.txtSee Microsoft Learn for Windows long-path requirements.
Data Related
Section titled “Data Related”Q1: US stock codes (e.g., AMD, AAPL) show incorrect prices during analysis?
Section titled “Q1: US stock codes (e.g., AMD, AAPL) show incorrect prices during analysis?”Symptom: After entering US stock codes, displayed prices are clearly wrong (e.g., AMD showing 7.33 yuan), or being misidentified as A-shares.
Cause: Earlier version code matching logic prioritized A-share rules, causing code conflicts.
Solution:
- Fixed in v2.3.0, system now supports automatic US stock code recognition
- If issues persist, set in
.env:This prioritizes Yahoo Finance data source for US stock data终端窗口 YFINANCE_PRIORITY=0
Related Issue: #153
Q2: “Volume Ratio” field shows empty or N/A in reports?
Section titled “Q2: “Volume Ratio” field shows empty or N/A in reports?”Symptom: Volume ratio data missing in analysis reports, affecting AI’s judgment on volume changes.
Cause: Some default real-time quote sources (e.g., Sina interface) don’t provide volume ratio field.
Solution:
- Fixed in v2.3.0, Tencent interface now supports volume ratio parsing
- Recommended real-time quote source priority:
终端窗口 REALTIME_SOURCE_PRIORITY=tencent,akshare_sina,efinance,akshare_em - System has built-in 5-day average volume calculation as fallback
Related Issue: #155
Q3: Tushare data fetch failed, showing Token error?
Section titled “Q3: Tushare data fetch failed, showing Token error?”Symptom: Log shows Tushare data fetch failed: Your token is incorrect, please verify
Solution:
- No Tushare account: No need to configure
TUSHARE_TOKEN, system will automatically use free data sources (AkShare, Efinance) - Have Tushare account: Verify Token is correct, check in Tushare Pro personal center
- All core features of this project work normally without Tushare
Q4: Data fetch rate-limited or returning empty?
Section titled “Q4: Data fetch rate-limited or returning empty?”Symptom: Log shows Circuit breaker triggered or data returns None
Cause: Free data sources (Eastmoney, Sina, etc.) have anti-scraping mechanisms, high-frequency requests get rate-limited.
Solution:
- System has built-in multi-source auto-switching and circuit breaker protection
- Reduce watchlist size, or increase request intervals
- Avoid frequently manually triggering analysis
Configuration Related
Section titled “Configuration Related”Q5: GitHub Actions run failed, showing environment variable not found?
Section titled “Q5: GitHub Actions run failed, showing environment variable not found?”Symptom: Actions log shows GEMINI_API_KEY or STOCK_LIST undefined
Cause: GitHub distinguishes Secrets (encrypted) and Variables (regular variables), wrong configuration location causes read failure.
Solution:
- Go to repo
Settings→Secrets and variables→Actions - Secrets (click
New repository secret): Store sensitive informationGEMINI_API_KEYOPENAI_API_KEYTELEGRAM_BOT_TOKEN- Various Webhook URLs
- Variables (click
Variablestab): Store non-sensitive configurationSTOCK_LISTGEMINI_MODELREPORT_TYPE
Compatibility note: the daily analysis workflow also binds the
STOCK_LISTenvironment, so aSTOCK_LISTvalue mistakenly added under that Environment’s variables can still be read. Repository variables remain the recommended location. Unless you want the daily job to wait for manual approval, do not add required reviewers, wait timers, or deployment branch restrictions to this Environment.
Q6: Configuration not taking effect after modifying .env file?
Section titled “Q6: Configuration not taking effect after modifying .env file?”Solution:
- Ensure
.envfile is in project root directory - Docker deployment / WebUI Settings:
--env-file .env/ Composeenv_fileonly injects the host.envas startup environment variables; it does not create or write back to/app/.envinside the container- When the active
.envfile does not contain a key, the WebUI Settings page falls back to showing the same key from startup-injected environment variables; the raw.envexport still contains only the active config file content - WebUI saves
STOCK_LIST,SCHEDULE_ENABLED,SCHEDULE_TIME,SCHEDULE_TIMES,SCHEDULE_RUN_IMMEDIATELY, andRUN_IMMEDIATELYback into the container’s.env - Saving from WebUI triggers a config reload for the current process, and runtime reads continue from the latest persisted
.env; for example, scheduled runs keep hot-reading the savedSTOCK_LIST - If you pass the same keys as startup env vars (
--env-file .env,docker run -e ..., or Composeenvironment:), those startup values can still win on later restarts; update or remove the same-name overrides if you want the WebUI-saved.envvalues to take over - To persist WebUI-saved config, point
ENV_FILEat a writable data-volume file such as/app/data/runtime.env; do not bind-mount the host.envas a single file over/app/.env - Saving
SCHEDULE_ENABLED,SCHEDULE_TIME, orSCHEDULE_TIMESstarts, stops, or rebuilds the runtime scheduler in long-running WebUI/API/Desktop processes; restarting a--serve-onlyor Desktop process restores enabled daily jobs without immediately running an analysis at startup SCHEDULE_RUN_IMMEDIATELYandRUN_IMMEDIATELYremain startup/one-shot settings; saving them does not immediately trigger an analysis runSCHEDULE_STARTUP_DEDUPcontrols the daily dedup of the CLI scheduler startup-immediate run (the startup catch-up run is skipped when a successful full analysis is already recorded for today; see the configuration table indocs/full-guide_EN.md); it is likewise a startup-time setting
- Manual
.envedits in Docker: Restart the container after changes终端窗口 docker-compose down && docker-compose up -d - GitHub Actions:
.envfile doesn’t work, must configure in Secrets/Variables - Check if there are multiple
.envfiles (e.g.,.env.local) causing override
Q7: How to configure proxy to access Gemini/OpenAI API?
Section titled “Q7: How to configure proxy to access Gemini/OpenAI API?”Solution:
Configure in .env:
USE_PROXY=truePROXY_HOST=127.0.0.1PROXY_PORT=10809Note: Proxy configuration only works for local runs, GitHub Actions environment doesn’t need proxy.
LLM Configuration
Section titled “LLM Configuration”Full details: LLM Config Guide.
Q: Configured both GEMINI_API_KEY and LLM_CHANNELS, why does it only use channels?
The system uses exactly one mode by priority: advanced YAML routing (LITELLM_CONFIG) > LLM_CHANNELS > legacy keys. However, YAML routing only takes effect when the file can be parsed successfully and yields a non-empty model_list; if the YAML path is invalid or the content is empty, the system automatically falls back to LLM_CHANNELS or legacy keys. Once a tier is active, lower-priority tiers are not used.
Q: check_env says no usable AI model is configured, what should I do?
Start with one provider and its API key. If you want to pin a primary model, add LITELLM_MODEL=provider/model. If you need multi-model switching, configure LLM_CHANNELS or advanced YAML routing. Run python scripts/check_env.py --config to validate config and python scripts/check_env.py --llm to actually call the API.
Q: How to use multiple models at once (e.g. AIHubmix + DeepSeek + Gemini)?
Use channel mode: set LLM_CHANNELS=aihubmix,deepseek,gemini and configure each channel’s LLM_{NAME}_BASE_URL, LLM_{NAME}_API_KEY, LLM_{NAME}_MODELS. You can also configure this visually in Web Settings → AI Model → AI Model Access.
Q: The ask-stock / Agent page says no usable LLM is configured, but I only use legacy GEMINI_* / OPENAI_* / ANTHROPIC_* settings. What should I check?
First confirm whether LITELLM_CONFIG or LLM_CHANNELS is active, because either of those tiers overrides legacy keys. If neither tier is active and AGENT_LITELLM_MODEL is empty, the ask-stock Agent still inherits legacy provider models automatically: GEMINI_MODEL, OPENAI_MODEL, and ANTHROPIC_MODEL are mapped to LiteLLM provider-prefixed model names for the corresponding runtime. This fix does not silently migrate or clear old settings; it only returns the real backend reason to the frontend so you can see whether the issue is a missing key, a missing model name, or an upper-tier config taking precedence. Full compatibility details are documented in the LLM Config Guide under “Ask-Stock Agent / LiteLLM compatibility notes”.
Push Notification Related
Section titled “Push Notification Related”Q8: Bot push failed, showing message too long?
Section titled “Q8: Bot push failed, showing message too long?”Symptom: Analysis succeeded but no notification received, log shows 400 error or Message too long
Cause: Different platforms have different message length limits:
- WeChat Work: 4KB
- Feishu: 20KB
- DingTalk: 20KB
Solution:
- Auto-chunking: Latest version implements automatic long message splitting
- Single stock push mode: Set
SINGLE_STOCK_NOTIFY=true, push immediately after each stock analysis - Brief report: Set
REPORT_TYPE=simplefor simplified format - Local file fallback: Even with no notification channel configured,
SINGLE_STOCK_NOTIFY=truestill saves each stock report toreports/report_YYYYMMDD_<stock_code>.md
Q8.1: Analysis finished, but no report file was created under reports/?
Section titled “Q8.1: Analysis finished, but no report file was created under reports/?”Common causes:
STOCK_LISTis empty and market review was not enabled for this run- The stock list is non-empty, but every stock analysis failed so no successful result was produced
- Stock results were produced, but writing to
reports/failed (for example due to permissions or mount issues)
Current behavior:
- CLI-triggered analysis now logs the exact failure reason for these cases
- Standalone non-
--serveruns now return a non-zero exit code so workflows do not treat “no report generated” as success - In single-stock push mode, local Markdown report saving still happens even when notifications are not configured
Q9: Not receiving Telegram push messages?
Section titled “Q9: Not receiving Telegram push messages?”Solution:
- Confirm both
TELEGRAM_BOT_TOKENandTELEGRAM_CHAT_IDare configured - How to get Chat ID:
- Send any message to the Bot
- Visit
https://api.telegram.org/bot<TOKEN>/getUpdates - Find
chat.idin the returned JSON
- Ensure Bot has been added to target group (if group chat)
- When running locally, need to be able to access Telegram API (may need proxy)
Q10: WeChat Work Markdown format not displaying correctly?
Section titled “Q10: WeChat Work Markdown format not displaying correctly?”Solution:
- WeChat Work has limited Markdown support, try setting:
终端窗口 WECHAT_MSG_TYPE=text - This will send plain text format messages
AI Model Related
Section titled “AI Model Related”Q11: Gemini API returns 429 error (too many requests)?
Section titled “Q11: Gemini API returns 429 error (too many requests)?”Symptom: Log shows Resource has been exhausted or 429 Too Many Requests
Solution:
- Gemini free tier has rate limits (about 15 RPM)
- Reduce number of stocks analyzed simultaneously
- Increase request delay:
终端窗口 GEMINI_REQUEST_DELAY=5ANALYSIS_DELAY=10 - Or switch to OpenAI-compatible API as backup
Q12: How to use DeepSeek and other Chinese models?
Section titled “Q12: How to use DeepSeek and other Chinese models?”Configuration method:
# No need to configure GEMINI_API_KEYOPENAI_API_KEY=sk-xxxxxxxxOPENAI_BASE_URL=https://api.deepseek.comOPENAI_MODEL=deepseek-v4-flash# deepseek-chat / deepseek-reasoner remain compatible, but DeepSeek marks them deprecated after 2026/07/24Supported model services:
- DeepSeek:
https://api.deepseek.com - Qwen (Tongyi Qianwen):
https://dashscope.aliyuncs.com/compatible-mode/v1 - Moonshot:
https://api.moonshot.cn/v1
Q12b: How to use Ollama local models?
Section titled “Q12b: How to use Ollama local models?”Configuration: Use OLLAMA_API_BASE + LITELLM_MODEL, or channel mode (LLM_CHANNELS=ollama + LLM_OLLAMA_BASE_URL + LLM_OLLAMA_MODELS).
Pitfall: Do not use OPENAI_BASE_URL for Ollama, or the system will concatenate URLs incorrectly (e.g. 404, api/generate/api/show). See LLM Config Guide Example 4 and channel examples.
Q12c: Getting OllamaException / APIConnectionError (All LLM models failed)?
Section titled “Q12c: Getting OllamaException / APIConnectionError (All LLM models failed)?”Symptom: Log shows litellm.APIConnectionError: OllamaException or Analysis failed: All LLM models failed (tried 1 model(s)).
Work through the following 5 checkpoints in order:
-
Is the Ollama service running?
终端窗口 # Check processpgrep -a ollama# If no output, start it firstollama serveVerify it is listening:
curl http://localhost:11434should returnOllama is running. -
Is
OLLAMA_API_BASEset correctly?- ✅ Correct:
OLLAMA_API_BASE=http://localhost:11434 - ❌ Wrong: Putting the Ollama address in
OPENAI_BASE_URLcauses the URL path to be mangled (e.g.…/api/generate/api/show).
- ✅ Correct:
-
Does the model name include the
ollama/prefix?- ✅ Correct:
LITELLM_MODEL=ollama/qwen3:8b - ❌ Wrong:
LITELLM_MODEL=qwen3:8b(missing prefix — litellm cannot route to Ollama)
- ✅ Correct:
-
Has the model been pulled locally?
终端窗口 ollama list # list downloaded modelsollama pull qwen3:8b # pull if missing -
Network / firewall for remote or Docker deployments
- If Ollama runs on a different host, set
OLLAMA_API_BASEto its actual IP, e.g.http://192.168.1.100:11434. - Make sure port 11434 is open and Ollama binds the right address (
OLLAMA_HOST=0.0.0.0:11434).
- If Ollama runs on a different host, set
See LLM Config Guide → Example 4 (Ollama) for a complete configuration example.
Docker Related
Section titled “Docker Related”Q13: Docker container exits immediately after starting?
Section titled “Q13: Docker container exits immediately after starting?”Solution:
- View container logs:
终端窗口 docker logs <container_id> - Common causes:
- Environment variables not correctly configured
.envfile format error (e.g., extra spaces)- Dependency package version conflicts
Q14: API service inaccessible in Docker?
Section titled “Q14: API service inaccessible in Docker?”Solution:
- Ensure startup command includes
--host 0.0.0.0(cannot be 127.0.0.1) - Check port mapping is correct:
ports:- "8000:8000"
Q14.1: Where is the software version stored when I install with Docker?
Section titled “Q14.1: Where is the software version stored when I install with Docker?”Short answer: For Docker users, the authoritative version is the image tag you actually deployed, not a hardcoded constant in a Python source file.
Why:
- Docker publishing is driven by
.github/workflows/docker-publish.yml, which only publishes release images for Git tags matchingv*.*.*(for example,v3.12.0). - So the Docker image version follows the GitHub Release / Git tag, rather than a fixed value in
main.py,server.py, or another backend module. - The
versionfield inapps/dsa-web/package.jsonis currently a placeholder0.0.0. The WebUI version/build card is useful for checking whether frontend assets were rebuilt, but it is not the Docker release version. - The desktop app has its own version in
apps/dsa-desktop/package.json, and that only applies to the Electron desktop build, not the Docker image.
How to check your current Docker version:
- Check the image tag in your deploy command or Compose file. For example, in
ghcr.io/zhulinsen/daily_stock_analysis:v3.12.0, the deployed version isv3.12.0. - If you used
latest, check your originaldocker pull,docker-compose.yml, or deployment script, then compare with GitHub Releases. - If you only want to confirm the frontend was refreshed, open WebUI → Settings and inspect
Build ID/Build Time; that confirms static asset freshness, not the Docker release version.
Recommendation: To avoid repeated updates, prefer a pinned version tag such as v3.12.0 instead of relying on latest.
Desktop App
Section titled “Desktop App”Q15: macOS says the desktop app is damaged or cannot be opened?
Section titled “Q15: macOS says the desktop app is damaged or cannot be opened?”Cause: The current macOS DMG is not signed and notarized with an Apple Developer certificate. After a browser download, macOS Gatekeeper may attach the quarantine attribute and block startup.
Solution:
-
Download only from the project’s GitHub Releases, and select the package matching your Mac architecture. Do not bypass Gatekeeper for third-party copies or files from an untrusted source.
-
Drag
Daily Stock Analysisinto Applications, then first try System Settings → Privacy & Security → Open Anyway. -
If it still does not start and you have verified that it came from the official project Release, remove quarantine only from this app and launch it:
终端窗口 xattr -dr com.apple.quarantine "/Applications/Daily Stock Analysis.app"open "/Applications/Daily Stock Analysis.app"
Replace the path if the app is not in /Applications. Never run xattr against the entire /Applications directory. This is a temporary way to allow a trusted unsigned app; it is not a substitute for signing or notarization. See the desktop packaging guide for the complete troubleshooting notes.
Related Issue: #2113
Other Issues
Section titled “Other Issues”Q16: How to run only market review, without stock analysis?
Section titled “Q16: How to run only market review, without stock analysis?”Method:
# Local runpython main.py --market-only
# GitHub Actions# Select mode: market-only when manually triggeringQ17: Buy/Hold/Sell counts in analysis results are incorrect?
Section titled “Q17: Buy/Hold/Sell counts in analysis results are incorrect?”Cause: Earlier versions used regex matching for statistics, may not match actual recommendations.
Solution: Fixed in latest version, AI model now directly outputs decision_type field for accurate statistics.
Q18: Why didn’t GitHub Actions run automatically on schedule in my fork, and how do I keep it updated?
Section titled “Q18: Why didn’t GitHub Actions run automatically on schedule in my fork, and how do I keep it updated?”Causes:
- GitHub disables scheduled workflows on newly forked repositories until you manually enable them in the
Actionstab. - GitHub automatically pauses
scheduletriggers in any repository with no repository activity for 60 days. - Local edits to
.github/workflows/*.ymlcan blockSync fork.
Solution:
- Click
Sync fork->Update branchon your GitHub repository page regularly (prefer configuring everything viaSecrets and variablesinstead of editing workflow files). - Re-enable the workflow under
Actions -> 每日股票分析 -> Enable workflowif it was paused after 60 days of inactivity. - For local runs, execute
python main.py --doctorfor an offline, redacted diagnostic summary of your config, LLM readiness, notifications, and storage permissions.
Still Have Questions?
Section titled “Still Have Questions?”If the above content doesn’t solve your issue, welcome to:
- Check Complete Configuration Guide
- Search or submit GitHub Issue
- Check Changelog for latest fixes
Last updated: 2026-08-03