AllenNeuralDynamics / dynamic-foraging-task

Bonsai/Harp workflow for Dynamic Foraging with Python GUI for visualization and control
MIT License
5 stars 4 forks source link

Window' object has no attribute 'Channel' #495

Open alexpiet opened 1 month ago

alexpiet commented 1 month ago

Window' object has no attribute 'Channel' | Foraging.py | _stop_logging | line 3165 | 3B, ephys3

death12239 commented 1 month ago

Good day, I believe this error is being caused by the Channel attribute not being initialized before it is used in the _stop_logging method. The issue arises when the _ConnectBonsai method does not successfully establish a connection and initialize the Channel attribute. To address the issue, we need to ensure that the Channel, Channel3, and Channel4 attributes are initialized in the constructor of the Window class or an initialization method. Additionally, we need to ensure that these attributes are correctly set up when the _ConnectBonsai method is called. If you'd like me to submit a pull request with my implementation of the bug fix then please let me know. Thank you.

alexpiet commented 3 weeks ago

Continues to happen: 10 | Window' object has no attribute 'Channel' | Foraging.py | _stop_logging | line 3192 | 3C, 3D, ephys3