Troubleshooting Guide¶
This guide addresses common issues you might encounter when using EthoPy and provides solutions to help you resolve them quickly.
Installation Issues¶
Package Installation Failures¶
Problem: Installation fails with dependency conflicts.
Solution: 1. Try creating a fresh virtual environment:
1 2 3 |
|
- If specific dependencies are failing, try installing them manually first:
1 2
pip install panda3d numpy pygame pip install ethopy
ImportError After Installation¶
Problem: You get ImportError: No module named 'ethopy'
after installation.
Solution: 1. Verify the package is installed:
1 |
|
- Make sure you're using the same Python environment where you installed the package.
- If installed in development mode, check that your working directory is properly set.
Database Connection Issues¶
Cannot Connect to Database¶
Problem: Error when connecting to MySQL database.
Solution:
1. Verify your connection information in local_conf.json
:
1 2 3 4 5 6 7 8 9 10 11 |
|
-
Make sure MySQL is running:
1 2 3 4 5 6
# For Linux/Mac sudo service mysql status # or sudo systemctl status mysql # For Windows (check in services)
-
Test connection with MySQL client:
1
mysql -u your_username -p
Schema Creation Errors¶
Problem: Errors when creating the database schema.
Solution: 1. Make sure the user has privileges to create databases and tables:
1 2 |
|
-
Try manually running the schema setup:
1 2 3 4 5 6
python3 -c 'from ethopy.core.experiment import *' python3 -c 'from ethopy.core.stimulus import *' python3 -c 'from ethopy.core.sehavior import *' python3 -c 'from ethopy.stimuli import *' python3 -c 'from ethopy.behaviors import *' python3 -c 'from ethopy.experiments import *'
-
Check for database encoding issues. EthoPy requires UTF-8 encoding.
Hardware Interface Issues¶
Port Communication Problems¶
Problem: Cannot communicate with hardware ports.
Solutions: ToDo
Raspberry Pi Specific Issues¶
Problem: Issues when running on Raspberry Pi.
Experiment Execution Issues¶
Experiment Fails to Start¶
Problem: ethopy -p your_task.py
fails to start the experiment.
Solution: 1. Check for syntax errors in your task file. 2. Verify that experiment, behavior, and stimulus classes are correctly imported and assigned. 3. Run with debug logging:
1 |
|
Reward Delivery Failures¶
Problem: Water rewards are not being delivered correctly.
Solution: 1. Run a calibration task to test the ports:
1 |
|
Data Logging Issues¶
Missing Trial Data¶
Problem: Some trial data is not being logged to the database.
Solution: 1. Check database connection during experiment execution. 2. Verify that your experiment states are correctly called.
Common Error Messages¶
"No task found with idx X"¶
Problem: ethopy --task-idx X
returns "No task found with idx X".
TODO: Solution: 1. Verify the task exists in the database:
1 |
|
1 |
|
"Multiple instances detected"¶
Problem: Attempt to run EthoPy when an instance is already running.
Solution: 1. Find and close the existing EthoPy process:
1 2 3 4 5 6 7 |
|
Getting Help¶
If you're still experiencing issues:
-
Check the documentation: Review related sections in the documentation for guidance.
-
Search GitHub Issues: Check if your issue has been reported and addressed: EthoPy GitHub Issues
-
Submit an Issue: If your problem persists, submit a detailed issue on GitHub with:
- EthoPy version (
ethopy --version
) - Python version (
python --version
) - Operating system details
- Complete error message and traceback
-
Steps to reproduce the problem
-
Contact Maintainers: For urgent issues, contact the package maintainers directly.
Appendix: Log Files¶
EthoPy creates log files that can be valuable for troubleshooting.
Reviewing these logs can provide insights into issues not apparent from console output.