Skip to content

Troubleshooting - When Things Go Wrong

Don’t panic! Every developer runs into problems. Here are the most common issues you might face while building GameVault (or any Framefox project) and how to fix them.

Most common causes:

  • Virtual environment not activated
  • Dependencies not installed
  • Port already in use

Solutions:

Terminal window
# 1. Make sure your virtual environment is active
source venv/bin/activate # Linux/Mac
# or
venv\Scripts\activate # Windows
# 2. Install/update dependencies (see [installation guide](/framefox/installation))
pip install -r requirements.txt
# 3. Try a different port
framefox run --port=8001
# 4. Clear cache and try again
framefox cache clear
framefox run

Problem: “Table doesn’t exist” errors

Section titled “Problem: “Table doesn’t exist” errors”

Solution: You probably forgot to run migrations!

Terminal window
framefox database create-migration
framefox database upgrade

Solution: Check what changed, rollback if needed

Terminal window
# See migration status
framefox database status
# Rollback if needed
framefox database downgrade
# Fix your [entity](/framefox/core/database), then create new migration
framefox database create-migration
framefox database upgrade

Solution: Stop the server, then restart

Terminal window
# Stop framefox run (Ctrl+C)
# Then restart
framefox run

Check these:

  1. Did you run framefox create user?
  2. Did you create and apply migrations after creating user?
  3. Are you visiting the right URLs (/login, /register)?

Solution:

Terminal window
# Create [user system](/framefox/core/security) if you haven't
framefox create user
# Apply database changes
framefox database create-migration
framefox database upgrade
# Check routes exist
framefox debug router

Solution: Check your routes and home controller

Terminal window
framefox debug router
# Make sure you have a home route or /dashboard route

Problem: “Page not found” when visiting your pages

Section titled “Problem: “Page not found” when visiting your pages”

Solutions:

Terminal window
# 1. Check what routes actually exist
framefox debug router
# 2. Make sure [controller](/framefox/core/controllers) was created properly
ls src/controller/
# 3. Clear cache
framefox cache clear
# 4. Restart server
framefox run

Check:

  • Template files are in the right folder (templates/controllername/)
  • File names match what the controller expects
  • No typos in file names

Common causes:

  1. Form method is GET instead of POST
  2. CSRF token missing
  3. Validation errors not displayed

Solutions:

<!-- Make sure form uses POST -->
<form method="POST">
<!-- Add CSRF token (see [templates guide](/framefox/core/templates)) -->
{{ csrf_token() }}
<!-- Your form fields -->
</form>

Check your template has:

{% if form.errors %}
<div class="alert alert-danger">
{% for field, errors in form.errors.items() %}
{% for error in errors %}
<p>{{ error }}</p>
{% endfor %}
{% endfor %}
</div>
{% endif %}

Check:

  • Bootstrap CSS is properly linked in your template
  • You’re using correct Bootstrap class names
  • No custom CSS overriding Bootstrap

Try:

  • Hard refresh your browser (Ctrl+F5)
  • Clear browser cache
  • Check browser developer tools for errors
  1. Open developer tools (F12)
  2. Check Console tab for JavaScript errors
  3. Check Network tab for failed requests
  4. Check Elements tab to inspect HTML
  • Keep an eye on the terminal where framefox run is running
  • Error messages usually tell you exactly what’s wrong
  • Don’t ignore warnings!
  • Python is case-sensitive: Gamegame
  • Check spelling in file names and imports
  • Make sure files are in the right folders
  • Remove recent changes and test again
  • Start with a minimal example
  • Add complexity back gradually
Terminal window
# Is everything installed?
pip list
# Is the database working?
framefox database status
# Are routes registered?
framefox debug router
# Clear all cache
framefox cache clear

Sometimes it’s easier to start over with a new project and copy working code:

Terminal window
framefox init test-project
cd test-project
# Copy your working files over
  • Check Framefox documentation
  • Search for the error message online
  • Ask on Python/web development forums
  • Check GitHub issues for Framefox
Terminal window
# Use git to save working versions
git add .
git commit -m "Working game list feature"
  • Don’t change 10 things at once
  • Test each small change before moving on
  • If something breaks, you know what caused it
  • Backup your database file (for SQLite projects)
  • Keep notes of what you changed
  • Save working configurations

Meaning: Python can’t find a file/module Fix: Check file paths, imports, and virtual environment

Meaning: Using a variable that doesn’t exist Fix: Check spelling, make sure variables are defined

Meaning: Trying to use something that doesn’t exist on an object Fix: Check object has the property/method you’re using

Meaning: Jinja2 can’t find your template file Fix: Check template file path and name

  • Every developer faces these problems
  • Errors are learning opportunities
  • Google is your friend
  • Take breaks when frustrated
  • Start simple, add complexity gradually

You’ve got this! Debugging is a skill that improves with practice. Soon you’ll be fixing problems like a pro! 🚀