Troubleshooting Guide¶
This guide helps you solve common problems when using EthoPy. Start with the problem that matches what you're seeing.
Installation Problems¶
"pip install ethopy" doesn't work¶
What you see: Error messages during installation
Try these steps:
-
Update pip first:
1pip install --upgrade pip -
Try installing in a clean environment:
1 2 3
python -m venv ethopy_env source ethopy_env/bin/activate # On Windows: ethopy_env\Scripts\activate pip install ethopy -
If you still get errors, ask your lab's technical support for help.
"No module named 'ethopy'" after installation¶
What you see: ImportError: No module named 'ethopy' when trying to use EthoPy
Try these steps:
-
Check if EthoPy is installed:
If you don't see ethopy in the list, reinstall it.1pip list | grep ethopy -
Make sure you're in the right environment where you installed EthoPy.
Database Connection Problems¶
"Cannot connect to database"¶
What you see: Error messages about database connection failing
Try these steps:
-
Check your password - Make sure the password in your
local_conf.jsonfile is correct -
Check your configuration file (see Local Configuration Guide):
1 2 3 4 5 6 7 8
{ "dj_local_conf": { "database.host": "127.0.0.1", "database.user": "root", "database.password": "your_actual_password", "database.port": 3306 } } -
For local database: Try running
mysql -u root -pin your terminal - If this doesn't work, MySQL isn't running on your computer
-
Ask your technical support to help start MySQL
-
For remote database: Contact your lab's database administrator
Experiment Won't Start¶
"Experiment fails to start"¶
What you see: Errors when running ethopy --task-path your_task.py
Try these steps:
-
Test with a simple example first:
1ethopy --task-path grating_test.py --log-console -
If the example works but your task doesn't, check your task file for errors
-
Get more information by adding debug logging:
1ethopy --task-path your_task.py --log-console --log-level DEBUG -
Look at the error messages - they usually tell you what's wrong
"Setup configuration not found"¶
What you see: Error about missing setup_conf_idx
Try these steps:
-
Use simulation mode (setup_conf_idx = 0) for testing:
1 2
# In your task file setup_conf_idx = 0 # Use simulation mode -
Create your hardware configuration - see Setup Configuration Guide
Hardware Not Working¶
"Hardware not responding" (Raspberry Pi/Arduino)¶
What you see: Sensors or valves not working
Try these steps:
-
Start with simulation mode (setup_conf_idx = 0) to test your experiment logic
-
Check hardware connections - make sure all cables are properly connected
-
Verify GPIO pin configuration in your
local_conf.jsonfile -
Contact your hardware setup person - they know your specific hardware best
"Reward delivery not working"¶
What you see: No water/reward coming out during experiments
Try these steps:
-
Check if water reservoir is full
-
Test ports manually if you have calibration software
-
Verify port configuration matches your hardware setup
-
Contact your lab technician for hardware issues
File and Data Problems¶
"Cannot find data path"¶
What you see: Errors about missing data directories
Try these steps:
-
Check if the folders exist - go to your file manager and look for the paths in your config
-
Create missing folders:
1 2
mkdir -p /path/to/your/data mkdir -p /path/to/your/backup -
Use full paths in your
local_conf.json(like/Users/yourname/datanot justdata)
"Permission denied" errors¶
What you see: Can't write to files or folders
Try these steps:
-
Choose a folder in your home directory for data storage
-
On Mac/Linux, make sure you can write to the folder:
1ls -la /path/to/your/folder -
Ask your system administrator if you can't access the folders you need
Common Error Messages¶
"Task not found"¶
What you see: Can't find your task file
Solution: Use the full path to your task file:
1 | |
"Already running"¶
What you see: EthoPy says it's already running
Solution: 1. Close any other EthoPy windows that might be open 2. Restart your computer if you're not sure 3. Wait a minute and try again
Getting Help¶
When to ask for help¶
Ask your lab's technical support when you see: - Database connection errors (after checking your password) - Hardware not responding - Permission/access errors - Installation problems that persist
How to ask for help effectively¶
When asking for help, include:
- What you were trying to do: "I was trying to run my task file..."
- What happened: "I got this error message: [copy the exact error]"
- What you already tried: "I checked my password and restarted EthoPy"
Information that helps¶
- EthoPy version: Run
python -c "import ethopy; print(ethopy.__version__)" - Your operating system: Windows, Mac, or Linux
- The exact error message: Copy and paste the whole error
Where to get help¶
- Your lab's technical support - they know your specific setup
- EthoPy documentation - check related guides for your issue
- GitHub Issues: Report bugs here
Quick Fixes¶
Before asking for help, try these:¶
- Restart EthoPy - close it completely and start again
- Check your internet connection - needed for some database connections
- Try simulation mode - use
setup_conf_idx = 0to test without hardware - Use example tasks - make sure EthoPy works with provided examples first
- Check log files - look in
~/.ethopy/ethopy.logfor error details
Most problems are caused by:¶
- Wrong passwords in configuration files
- Missing folders for data storage
- Hardware not properly connected
- Typos in file paths
- Using the wrong setup_conf_idx for your hardware
Remember: It's better to ask for help early than to spend hours stuck on a problem!