Common Issues
OpenAI API Key Issues
Problem: Error when clicking Calculate button or application fails to start Solution: Set up your OpenAI API key as an environment variable:~/.bashrc, ~/.zshrc, etc.).
Dependency Installation Errors
Problem:ModuleNotFoundError or import errors when running python main.py
Solution: Ensure all dependencies are installed:
pillow==10.2.0- For image processingopenai==1.14.2- For OpenAI API integration
If you’re using a virtual environment, make sure it’s activated before installing dependencies.
Drawing Not Appearing on Canvas
Problem: Canvas appears but drawing doesn’t show up Possible causes and solutions:- Mouse binding issue: Ensure you’re clicking and dragging (not just clicking) on the canvas
- Display settings: The canvas background is black and drawing color is white - check your display contrast settings
- Tkinter installation: On some Linux systems, tkinter may not be installed by default
Calculate Button Not Working
Problem: Clicking Calculate doesn’t show any result Common reasons:- Missing equals sign: The equals sign must be the last thing drawn before calculating
- Nothing drawn: Ensure you’ve drawn an equation on the canvas
- API quota exceeded: Check your OpenAI API usage and billing status
- Network connectivity: The app requires internet connection to communicate with OpenAI API
Undo Function Issues
Problem: Undo (Cmd/Ctrl+Z) doesn’t work Solutions:- Keyboard shortcut: Try using the Undo button instead of the keyboard shortcut
- Platform-specific binding: On macOS, use
Cmd+Z. On Windows/Linux, the binding may need to be updated in the code - No actions to undo: Undo only works if you’ve drawn something on the canvas
Font Display Issues
Problem: Answer appears but uses wrong font or looks distorted Cause: The application uses “Noteworthy” font which may not be available on all systems Solution: The application will fall back to default fonts if Noteworthy isn’t available. This is normal and doesn’t affect functionality.Application Window Issues
Problem: Window is too large or doesn’t fit on screen Solution: The default canvas size is 1200x800 pixels. If this doesn’t fit your screen, you can modify the dimensions inmain.py:13-14.
API Rate Limiting
Problem: Getting rate limit errors from OpenAI Solution:- Wait a few moments between calculations
- Check your OpenAI account tier and rate limits
- Upgrade your OpenAI plan if you need higher rate limits
The application uses the
gpt-4o model which requires appropriate API access. Ensure your API key has access to this model.Python Version Compatibility
Problem: Application fails to start or import errors Solution: Ensure you’re using Python 3.7 or higher. The application uses modern Python features and recent library versions.Getting Help
If you encounter issues not covered here:- Check the GitHub repository for known issues
- Review your error messages carefully - they often indicate the exact problem
- Verify all environment variables are set correctly
- Ensure you have a stable internet connection