Skip to content

Troubleshooting

Quick Diagnostics

Run the built-in diagnostic tool:

Terminal window
niki doctor

This checks:

  • Configuration file
  • Dependencies
  • API key
  • Daemon status

Common Issues

Daemon Not Running

Symptom: No notifications received

Terminal window
# Check status
niki daemon status
# Start daemon
niki daemon start
# Or in foreground for debugging
niki daemon start --foreground

API Key Not Configured

Symptom: “API key not found” error

Terminal window
# Set environment variable
export ANTHROPIC_API_KEY="sk-ant-..."
# Verify
echo $ANTHROPIC_API_KEY

Make sure the variable is set in your shell profile (~/.bashrc, ~/.zshrc).

Telegram Bot Not Responding

Symptoms:

  • No notifications
  • Bot doesn’t respond to messages

Solutions:

  1. Check bot token is correct:

    Terminal window
    niki doctor
  2. Verify you messaged the bot first (send /start)

  3. Check your user ID is in allowed_user_ids

  4. Restart daemon after config changes:

    Terminal window
    niki daemon stop
    niki daemon start

Slack Bot Not Responding

Symptoms:

  • Bot appears offline
  • DMs not received

Solutions:

  1. Check Socket Mode is enabled in Slack app settings

  2. Verify packages installed:

    Terminal window
    pip install niki[slack]
  3. Check message.im event is subscribed

  4. Reinstall app after adding scopes

”Package not found” Errors

Symptom: Import errors on daemon start

Terminal window
# Install missing packages
pip install niki[all]
# Or specific features
pip install niki[slack]
pip install niki[telegram]
pip install niki[jupyter]

Notifications Not Sent

Symptoms:

  • Job completes but no notification
  • Only some jobs trigger notifications

Check:

  1. Job duration meets threshold:

    [general]
    threshold_seconds = 60 # Jobs under 60s won't notify
  2. Notification mode allows notifications:

    Terminal window
    niki mode active
  3. Check daemon logs:

    Terminal window
    journalctl --user -u niki -f

Jupyter Extension Not Loading

Symptom: %load_ext niki fails

Terminal window
# Install Jupyter support
pip install niki[jupyter]
# Verify
python -c "from niki.jupyter import IPYTHON_AVAILABLE; print(IPYTHON_AVAILABLE)"

Permission Errors

Symptom: Can’t write to config directory

Terminal window
# Check permissions
ls -la ~/.niki/
# Fix permissions
chmod 700 ~/.niki/
chmod 600 ~/.niki/config.toml

Getting Help

  1. Check GitHub Issues
  2. Search Discussions
  3. Open a new issue with:
    • Output of niki doctor
    • Error messages
    • Your configuration (redact tokens)

Debug Mode

For detailed logs:

Terminal window
# Set log level
# In config.toml:
[daemon]
log_level = "debug"
# Restart daemon
niki daemon stop
niki daemon start --foreground