Faq

Introduction #

This document summarizes common questions and answers (FAQ) for SmartChart, covering installation, dependencies, datasets, and chart configuration issues.

Quick Category Reference #

Category Topics
Installation Port conflicts, command not found, password reset
Dependencies urllib3 version conflicts
Datasets Data not updating, parameter linkage failures
Graphics Blank/not displaying charts

FAQ #

Installation #

Q: Error “An attempt was made to access a socket in a way forbidden by its access permissions”

Common on Windows when the port is occupied (KuGou music etc. may use port 8000):

netstat -ano|findstr 8000   # Find the process ID
taskkill /pid PID /F         # Force kill the process

Or start on a different port: smartchart runserver 0.0.0.0:8001 --insecure --noreload


Q: Command smartchart not found

Check if multiple Python environments are causing PATH conflicts. Solutions:

  • Uninstall one Python environment
  • Or run with full path: python -m smart_chart

Q: Cannot install pip

Python was installed without checking “Add to PATH”. Solutions:

  1. Reinstall Python (check “Add to PATH”)
  2. Or manually add the Scripts folder to system PATH

Q: Mac installation issues (command not found, etc.)

Most likely, the system has a residual old Python 3 under /Library/Developer/CommandLineTools conflicting with the new installation:

sudo rm -rf /Library/Developer/CommandLineTools
sudo rm -f /usr/bin/python3
# Then reinstall Python per documentation

Verify complete uninstall: type python3 and pip3 — “command not found” means it’s clean.


Q: Forgot admin password

smartchart changepassword your_username

Dependencies #

Q: urllib3 version conflict during installation

Error like <PACKAGE> depends on urllib3==2.0.0:

pip install urllib3==1.26.15

Datasets #

Q: Dataset saved but chart data not updating

Common causes:

  1. Dataset has cache time set — wait for expiry or add &refresh=Y to URL for forced refresh
  2. Dataset is lazy-load mode — needs manual ds_refresh() trigger
  3. SQL query itself doesn’t return new data

Q: Parameter linkage not updating data

Possible causes:

  1. SQL parameter name ($param_name) doesn’t match frontend parameter name (case-sensitive)
  2. Dataset has cache — parameterized datasets should have cache time set to 0

Graphics #

Q: Chart blank/not displaying

Check steps:

  1. Open browser F12, check Console for JS errors
  2. Verify dataset has data (execute query in dataset editor)
  3. Check __dataset__ usage in chart code
  4. For multi-query, verify dataset.df0 format