Skip to content

Troubleshooting

Manu Murugesan edited this page Mar 13, 2026 · 1 revision

Troubleshooting

Local Development

Blank page after panel serve

The server may still be starting. Wait 10–15 seconds and refresh. Check the terminal for startup errors.

Make sure you're visiting http://localhost:<port>/app (not just http://localhost:<port>/).

"Cookie secret not set" or authentication errors

You must pass --cookie-secret when using --basic-auth:

panel serve visualize_accelerometry/app.py \
    --port 5601 \
    --basic-auth credentials.json \
    --cookie-secret $(python -c "import secrets; print(secrets.token_hex(32))") \
    --allow-websocket-origin localhost:5601 \
    --basic-login-template visualize_accelerometry/templates/login.html

Port already in use

If port 5601 (or your chosen port) is occupied:

# Find what's using the port
lsof -i :5601

# Kill it (if it's a stale Panel process)
kill <PID>

Or just use a different port: --port 5602.

lttbc not installed — is that a problem?

No. The tool falls back to strided sampling automatically. You'll see no error — just a slightly different (but visually equivalent) downsampling method. To install lttbc for optimal downsampling:

pip install lttbc

Invalid time entered in Anchor Time

The Anchor Time input expects the exact format Jun 01 2005 01:33 PM. If you enter a different format, the input is silently ignored. Check the terminal for a "Invalid time entered" message.

Window size input not updating

The Window Size input accepts a number in seconds, optionally with an "s" suffix (e.g., 3600 or 3600s). Non-numeric input is silently ignored.

HPC / Slurm

SSH tunnel fails to connect

  1. Verify the Slurm job is actually running: ssh <user>@<login-node> "squeue -u $USER -n py_accel_viewer"
  2. Check that server_info.txt exists on the compute node (created after server startup)
  3. Try the manual SSH command printed by connect.sh when it fails
  4. Check your VPN connection if the login node is behind one

Job stuck in PENDING

The cluster may be busy. Check queue status:

ssh <user>@<login-node> "squeue -u $USER"

Consider adjusting partition or resource requests in hpc_utils/start_server.sh.

Port conflict on HPC

connect.sh auto-increments the local port if the preferred one (default 7860) is busy. It tries ports 7860–7880 before giving up. If all are taken, kill stale tunnels:

# Find stale SSH tunnels
ps aux | grep "ssh.*-L.*7860"

# Kill them
kill <PID>

REMOTE_DIR not found

The script fails immediately if the project directory doesn't exist on the login node. Double-check the path in connect.sh or set it via environment variable:

export REMOTE_DIR=/path/to/project
bash hpc_utils/connect.sh

Annotations

Bokeh serialization error (NaN)

Bokeh's JSON encoder has allow_nan=False. If you see a serialization error, it likely means an annotation row has NaN in a numeric column (segment, scoring, review, start_epoch, end_epoch). The tool fills these automatically, but manually edited Excel files might introduce NaN. Fix by opening the Excel file and replacing blank cells in those columns with 0.

Annotations from a previous session not showing

Annotations are loaded from visualize_accelerometry/data/output/annotations_<username>.xlsx. Make sure:

  1. You exported (clicked Export) before the previous session ended
  2. The output directory hasn't changed (check config.py or config overrides)
  3. You're logged in as the same user