Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Troubleshooting

IssuePossible CauseFix
python or py not foundPython not installed or not added to PATH (Windows)Reinstall Python and check Add python.exe to PATH. Try py on Windows, python3 on macOS/Linux.
Can’t activate venv on Windows (script execution disabled)PowerShell’s execution policy is blocking scriptsOpen PowerShell as your user and run: Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser. Then try activating again. Only do this for your user account.
ModuleNotFoundError: No module named 'flask'Virtual environment not activated, or packages not installedActivate your venv ((.venv)) and run pip install -r requirements.txt again.
Port 5000 already in useSomething else is running on port 5000Close the other program, or run Flask on a different port: flask run --port 5001. Remember to go to the new port in your browser.
Database errorsCorrupted or missing databaseDelete instance/users.db and run python init_db.py again.
Page doesn’t load / connection refusedServer not runningMake sure the terminal with python app.py is still running and hasn’t crashed. Check for errors in that terminal.
Changes aren’t showing upBrowser cache or server not restartedHard refresh your browser (Ctrl+Shift+R or Cmd+Shift+R). If you changed app.py, restart the server with Ctrl+C and python app.py again.
Quotes being weird when copying payloadsSmart quotes from some documentsAlways type the payloads exactly as shown in the book. Avoid copying from rich text documents, copy from the code blocks.