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

Could not connect to device. Is the device connected or currently being used? #925

Open alexpiet opened 3 weeks ago

alexpiet commented 3 weeks ago

This issue was automatically generated from GUI logs.

file: stepper_motor_device.py
function: init
line 58
logfile: DT300178/DT300178-A_gui_log_2024-11-01_10-35-23.txt
boxes: 6D, 7D, 9D
count: 3
text: Could not connect to device. Is the device connected or currently being used?


Log context

10:35:24 AM:INFO:Foraging:Foraging.py:_InitializeBonsai:line 1392:Trying to connect to already running Bonsai
10:35:24 AM:INFO:Foraging:Foraging.py:_ConnectOSC:line 1445:connecting to GUI and Bonsai through OSC
10:35:25 AM:INFO:Foraging:Foraging.py:_InitializeBonsai:line 1396:Could not connect: timed out
10:35:25 AM:INFO:Foraging:Foraging.py:_InitializeBonsai:line 1407:Starting Bonsai
10:35:25 AM:INFO:Foraging:Foraging.py:log_subprocess_output:line 4861:BONSAI logging starting
10:35:26 AM:INFO:Foraging:Foraging.py:_ConnectOSC:line 1445:connecting to GUI and Bonsai through OSC
10:35:27 AM:INFO:Foraging:Foraging.py:_InitializeBonsai:line 1421:Could not connect, total waiting time 0.5 seconds: timed out
10:35:27 AM:INFO:Foraging:Foraging.py:_ConnectOSC:line 1445:connecting to GUI and Bonsai through OSC
10:35:28 AM:INFO:Foraging:Foraging.py:_InitializeBonsai:line 1421:Could not connect, total waiting time 1.0 seconds: timed out
10:35:29 AM:INFO:Foraging:Foraging.py:_ConnectOSC:line 1445:connecting to GUI and Bonsai through OSC
10:35:30 AM:INFO:Foraging:Foraging.py:_InitializeBonsai:line 1421:Could not connect, total waiting time 1.5 seconds: timed out
10:35:30 AM:INFO:Foraging:Foraging.py:_ConnectOSC:line 1445:connecting to GUI and Bonsai through OSC
10:35:30 AM:INFO:Foraging:Foraging.py:_InitializeBonsai:line 1424:Connected to Bonsai after 2.0 seconds
10:35:30 AM:INFO:Foraging:Foraging.py:_InitializeBonsai:line 1425:Bonsai started successfully
10:35:30 AM:INFO:Foraging:Foraging.py:_ConnectSlims:line 1263:Attempting to connect to Slims
10:35:31 AM:INFO:Foraging:Foraging.py:_ConnectSlims:line 1280:Successfully connected to Slims
10:35:31 AM:WARNING:Dialogs:Dialogs.py:_LoadCalibrationParameters:line 509:could not find water calibration parameters: C:\Users\svc_aind_behavior\Documents\ForagingSettings\WaterCalibrationPar_1.json
10:35:31 AM:WARNING:warnings:warnings.py:_showwarnmsg:line 110:C:\Users\svc_aind_behavior\Documents\GitHub\dynamic-foraging-task\src\foraging_gui\Visualization.py:403: UserWarning: No artists with labels found to put in legend.  Note that artists whose label start with an underscore are ignored when legend() is called with no argument.
  self.ax1.legend(loc='lower right', fontsize=8)

10:35:31 AM:INFO:Foraging:Foraging.py:keyPressEvent:line 1919:processing parameter changes
10:35:31 AM:INFO:Foraging:Foraging.py:_InitializeMotorStage:line 857:Scanning for newscale stages
10:35:31 AM:WARNING:Foraging:Foraging.py:_InitializeMotorStage:line 867:Could not find any instances of NewScale Stage
10:35:31 AM:INFO:Foraging:Foraging.py:_insert_stage_widget:line 239:Inserting Stage Widget
10:35:31 AM:INFO:connection:connection.py:_connect:line 688:Connecting to aibspi(10.128.108.106):2181, use_ssl: False
10:35:31 AM:INFO:client:client.py:_session_callback:line 561:Zookeeper connection established, state: CONNECTED
10:35:31 AM:INFO:mpeconfig:mpeconfig.py:cache_remote_config:line 310:Copying previous configuration to C:/ProgramData/AIBS_MPE/stage_widget/config/stage_widget.yml.241101-103531.bck
10:35:31 AM:INFO:connection:connection.py:_connect_attempt:line 655:Closing connection to aibspi:2181
10:35:31 AM:INFO:client:client.py:_session_callback:line 567:Zookeeper session closed, state: CLOSED
10:35:32 AM:ERROR:stepper_motor_device:stepper_motor_device.py:__init__:line 58:Could not connect to device. Is the device connected or currently being used?
ellahiltonvano commented 3 weeks ago

related to #895?

alexpiet commented 3 weeks ago

Yes, this looks like the same issue as #895.

ellahiltonvano commented 3 weeks ago

6D has had some issues crashing this week, potentially related to:

alexpiet commented 2 weeks ago

This issue reoccurred:

file: stepper_motor_device.py
function: init
line 58
logfile: W10DT714674/W10DT714674-D_gui_log_2024-11-07_11-10-35.txt
boxes: 6D
count: 6
text: Could not connect to device. Is the device connected or currently being used?

GUI Log snippet (click for full log)

11:10:37 AM:INFO:Foraging:Foraging.py:log_subprocess_output:line 4822:BONSAI logging starting
11:10:37 AM:INFO:Foraging:Foraging.py:_ConnectOSC:line 1406:connecting to GUI and Bonsai through OSC
11:10:38 AM:INFO:Foraging:Foraging.py:_InitializeBonsai:line 1382:Could not connect, total waiting time 0.5 seconds: timed out
11:10:39 AM:INFO:Foraging:Foraging.py:_ConnectOSC:line 1406:connecting to GUI and Bonsai through OSC
11:10:39 AM:INFO:Foraging:Foraging.py:_InitializeBonsai:line 1385:Connected to Bonsai after 1.0 seconds
11:10:39 AM:INFO:Foraging:Foraging.py:_InitializeBonsai:line 1386:Bonsai started successfully
11:10:39 AM:INFO:Foraging:Foraging.py:_ConnectSlims:line 1263:Attempting to connect to Slims
11:10:39 AM:INFO:rigcontrol:rigcontrol.py:msg_handler:line 52:['/PhotometryFalling', 10206897.569536, '127.0.0.1', 4033], displaying at 0.5 Hz
11:10:39 AM:INFO:rigcontrol:rigcontrol.py:msg_handler:line 56:['/BehaviorEvent', 10206897.577504, '127.0.0.1', 4032]
11:10:39 AM:INFO:Foraging:Foraging.py:_ConnectSlims:line 1280:Successfully connected to Slims
11:10:40 AM:WARNING:Dialogs:Dialogs.py:_LoadCalibrationParameters:line 509:could not find water calibration parameters: C:\Users\svc_aind_behavior\Documents\ForagingSettings\WaterCalibrationPar_4.json
11:10:40 AM:INFO:Foraging:Foraging.py:keyPressEvent:line 1880:processing parameter changes
11:10:40 AM:INFO:Foraging:Foraging.py:_InitializeMotorStage:line 857:Scanning for newscale stages
11:10:40 AM:WARNING:Foraging:Foraging.py:_InitializeMotorStage:line 867:Could not find any instances of NewScale Stage
11:10:40 AM:INFO:Foraging:Foraging.py:_insert_stage_widget:line 239:Inserting Stage Widget
11:10:40 AM:INFO:connection:connection.py:_connect:line 688:Connecting to aibspi(10.128.108.106):2181, use_ssl: False
11:10:40 AM:INFO:client:client.py:_session_callback:line 561:Zookeeper connection established, state: CONNECTED
11:10:40 AM:INFO:connection:connection.py:_connect_attempt:line 655:Closing connection to aibspi:2181
11:10:40 AM:INFO:client:client.py:_session_callback:line 567:Zookeeper session closed, state: CLOSED
11:10:40 AM:ERROR:stepper_motor_device:stepper_motor_device.py:__init__:line 58:Could not connect to device. Is the device connected or currently being used?

Full GUI log (first 400 lines)

11:10:35 AM:INFO:Foraging:Foraging.py:start_gui_log_file:line 4707:Starting logfile!
11:10:35 AM:INFO:Foraging:Foraging.py:log_git_hash:line 4718:Python version: 3.11.9 | packaged by Anaconda, Inc. | (main, Apr 19 2024, 16:40:41) [MSC v.1916 64 bit (AMD64)]
11:10:36 AM:INFO:Foraging:Foraging.py:log_git_hash:line 4735:Current git commit branch, hash: main, 4f4f59556389b4696a28bcbed810dec00816cf61
11:10:36 AM:INFO:Foraging:Foraging.py:log_git_hash:line 4739:Current foraging_gui version: 1.6.8
11:10:36 AM:WARNING:Foraging:Foraging.py:log_git_hash:line 4749:local repository is clean
11:10:36 AM:INFO:Foraging:Foraging.py:<module>:line 4850:Setting QApplication attributes
11:10:36 AM:INFO:Foraging:Foraging.py:<module>:line 4858:Starting QApplication and Window
11:10:36 AM:INFO:Foraging:Foraging.py:__init__:line 66:Creating Window
11:10:36 AM:INFO:Foraging:Foraging.py:_GetSettings:line 1156:Loaded settings_box file
11:10:36 AM:INFO:Foraging:Foraging.py:_GetSettings:line 1184:Loaded settings file
11:10:36 AM:WARNING:Foraging:Foraging.py:_GetSettings:line 1194:Missing setting (FIP_settings), using default: C:\Users\svc_aind_behavior\Documents\FIPSettings
11:10:36 AM:WARNING:Foraging:Foraging.py:_GetSettings:line 1194:Missing setting (bonsai_config_path), using default: C:\Users\svc_aind_behavior\Documents\GitHub\dynamic-foraging-task\bonsai\Bonsai.config
11:10:36 AM:WARNING:Foraging:Foraging.py:_GetSettings:line 1194:Missing setting (metadata_dialog_folder), using default: C:\Users\svc_aind_behavior\Documents\ForagingSettings\metadata_dialog\
11:10:36 AM:WARNING:Foraging:Foraging.py:_GetSettings:line 1194:Missing setting (rig_metadata_folder), using default: C:\Users\svc_aind_behavior\Documents\ForagingSettings\rig_metadata\
11:10:36 AM:WARNING:Foraging:Foraging.py:_GetSettings:line 1194:Missing setting (project_info_file), using default: C:\Users\svc_aind_behavior\Documents\ForagingSettings\Project Name and Funding Source v2.csv
11:10:36 AM:WARNING:Foraging:Foraging.py:_GetSettings:line 1194:Missing setting (schedule_path), using default: Z:\dynamic_foraging\DynamicForagingSchedule.csv
11:10:36 AM:WARNING:Foraging:Foraging.py:_GetSettings:line 1194:Missing setting (go_cue_decibel_box1), using default: 60
11:10:36 AM:WARNING:Foraging:Foraging.py:_GetSettings:line 1194:Missing setting (go_cue_decibel_box2), using default: 60
11:10:36 AM:WARNING:Foraging:Foraging.py:_GetSettings:line 1194:Missing setting (go_cue_decibel_box3), using default: 60
11:10:36 AM:WARNING:Foraging:Foraging.py:_GetSettings:line 1194:Missing setting (lick_spout_distance_box1), using default: 5000
11:10:36 AM:WARNING:Foraging:Foraging.py:_GetSettings:line 1194:Missing setting (lick_spout_distance_box2), using default: 5000
11:10:36 AM:WARNING:Foraging:Foraging.py:_GetSettings:line 1194:Missing setting (lick_spout_distance_box3), using default: 5000
11:10:36 AM:WARNING:Foraging:Foraging.py:_GetSettings:line 1194:Missing setting (lick_spout_distance_box4), using default: 5000
11:10:36 AM:WARNING:Foraging:Foraging.py:_GetSettings:line 1194:Missing setting (name_mapper_file), using default: C:\Users\svc_aind_behavior\Documents\ForagingSettings\name_mapper.json
11:10:36 AM:WARNING:Foraging:Foraging.py:_GetSettings:line 1194:Missing setting (create_rig_metadata), using default: True
11:10:36 AM:WARNING:Foraging:Foraging.py:_GetSettings:line 1194:Missing setting (save_each_trial), using default: True
11:10:36 AM:WARNING:Foraging:Foraging.py:_GetSettings:line 1194:Missing setting (AutomaticUpload), using default: True
11:10:36 AM:WARNING:Foraging:Foraging.py:_GetSettings:line 1194:Missing setting (manifest_flag_dir), using default: C:\Users\svc_aind_behavior\Documents\aind_watchdog_service\manifest
11:10:36 AM:WARNING:Foraging:Foraging.py:_GetSettings:line 1194:Missing setting (auto_engage), using default: True
11:10:36 AM:WARNING:Foraging:Foraging.py:_GetSettings:line 1194:Missing setting (clear_figure_after_save), using default: True
11:10:36 AM:WARNING:Foraging:Foraging.py:_GetSettings:line 1194:Missing setting (add_default_project_name), using default: True
11:10:36 AM:INFO:Foraging:Foraging.py:_LoadSchedule:line 1082:Loaded behavior schedule
11:10:36 AM:INFO:Foraging:Foraging.py:_GetWaterCalibration:line 1046:Loaded Water Calibration
11:10:36 AM:INFO:Foraging:Foraging.py:_load_most_recent_rig_json:line 1525:Found existing rig.json: rig_446-6-D_2024-11-05_11_08_20.json
11:10:36 AM:INFO:RigJsonBuilder:RigJsonBuilder.py:build_rig_json_core:line 60:building rig json
11:10:36 AM:INFO:RigJsonBuilder:RigJsonBuilder.py:build_rig_json_core:line 624:finished building rig json
11:10:36 AM:INFO:RigJsonBuilder:RigJsonBuilder.py:build_rig_json:line 53:Using existing rig json
11:10:36 AM:INFO:Foraging:Foraging.py:_LoadUI:line 259:Using ForagingGUI.ui interface
11:10:36 AM:INFO:Foraging:Foraging.py:__init__:line 107:Setting Window title: 446-6-D
11:10:36 AM:INFO:Foraging:Foraging.py:_InitializeBonsai:line 1353:Trying to connect to already running Bonsai
11:10:36 AM:INFO:Foraging:Foraging.py:_ConnectOSC:line 1406:connecting to GUI and Bonsai through OSC
11:10:37 AM:INFO:Foraging:Foraging.py:_InitializeBonsai:line 1357:Could not connect: timed out
11:10:37 AM:INFO:Foraging:Foraging.py:_InitializeBonsai:line 1368:Starting Bonsai
11:10:37 AM:INFO:Foraging:Foraging.py:log_subprocess_output:line 4822:BONSAI logging starting
11:10:37 AM:INFO:Foraging:Foraging.py:_ConnectOSC:line 1406:connecting to GUI and Bonsai through OSC
11:10:38 AM:INFO:Foraging:Foraging.py:_InitializeBonsai:line 1382:Could not connect, total waiting time 0.5 seconds: timed out
11:10:39 AM:INFO:Foraging:Foraging.py:_ConnectOSC:line 1406:connecting to GUI and Bonsai through OSC
11:10:39 AM:INFO:Foraging:Foraging.py:_InitializeBonsai:line 1385:Connected to Bonsai after 1.0 seconds
11:10:39 AM:INFO:Foraging:Foraging.py:_InitializeBonsai:line 1386:Bonsai started successfully
11:10:39 AM:INFO:Foraging:Foraging.py:_ConnectSlims:line 1263:Attempting to connect to Slims
11:10:39 AM:INFO:rigcontrol:rigcontrol.py:msg_handler:line 52:['/PhotometryFalling', 10206897.569536, '127.0.0.1', 4033], displaying at 0.5 Hz
11:10:39 AM:INFO:rigcontrol:rigcontrol.py:msg_handler:line 56:['/BehaviorEvent', 10206897.577504, '127.0.0.1', 4032]
11:10:39 AM:INFO:Foraging:Foraging.py:_ConnectSlims:line 1280:Successfully connected to Slims
11:10:40 AM:WARNING:Dialogs:Dialogs.py:_LoadCalibrationParameters:line 509:could not find water calibration parameters: C:\Users\svc_aind_behavior\Documents\ForagingSettings\WaterCalibrationPar_4.json
11:10:40 AM:INFO:Foraging:Foraging.py:keyPressEvent:line 1880:processing parameter changes
11:10:40 AM:INFO:Foraging:Foraging.py:_InitializeMotorStage:line 857:Scanning for newscale stages
11:10:40 AM:WARNING:Foraging:Foraging.py:_InitializeMotorStage:line 867:Could not find any instances of NewScale Stage
11:10:40 AM:INFO:Foraging:Foraging.py:_insert_stage_widget:line 239:Inserting Stage Widget
11:10:40 AM:INFO:connection:connection.py:_connect:line 688:Connecting to aibspi(10.128.108.106):2181, use_ssl: False
11:10:40 AM:INFO:client:client.py:_session_callback:line 561:Zookeeper connection established, state: CONNECTED
11:10:40 AM:INFO:connection:connection.py:_connect_attempt:line 655:Closing connection to aibspi:2181
11:10:40 AM:INFO:client:client.py:_session_callback:line 567:Zookeeper session closed, state: CLOSED
11:10:40 AM:ERROR:stepper_motor_device:stepper_motor_device.py:__init__:line 58:Could not connect to device. Is the device connected or currently being used?

alexpiet commented 2 weeks ago

This issue reoccurred:

file: stepper_motor_device.py
function: init
line 58
logfile: W10DT714674/W10DT714674-D_gui_log_2024-11-07_11-10-35.txt
boxes: 6D
count: 6
text: Could not connect to device. Is the device connected or currently being used?

GUI Log snippet (click for full log)

11:10:37 AM:INFO:Foraging:Foraging.py:log_subprocess_output:line 4822:BONSAI logging starting
11:10:37 AM:INFO:Foraging:Foraging.py:_ConnectOSC:line 1406:connecting to GUI and Bonsai through OSC
11:10:38 AM:INFO:Foraging:Foraging.py:_InitializeBonsai:line 1382:Could not connect, total waiting time 0.5 seconds: timed out
11:10:39 AM:INFO:Foraging:Foraging.py:_ConnectOSC:line 1406:connecting to GUI and Bonsai through OSC
11:10:39 AM:INFO:Foraging:Foraging.py:_InitializeBonsai:line 1385:Connected to Bonsai after 1.0 seconds
11:10:39 AM:INFO:Foraging:Foraging.py:_InitializeBonsai:line 1386:Bonsai started successfully
11:10:39 AM:INFO:Foraging:Foraging.py:_ConnectSlims:line 1263:Attempting to connect to Slims
11:10:39 AM:INFO:rigcontrol:rigcontrol.py:msg_handler:line 52:['/PhotometryFalling', 10206897.569536, '127.0.0.1', 4033], displaying at 0.5 Hz
11:10:39 AM:INFO:rigcontrol:rigcontrol.py:msg_handler:line 56:['/BehaviorEvent', 10206897.577504, '127.0.0.1', 4032]
11:10:39 AM:INFO:Foraging:Foraging.py:_ConnectSlims:line 1280:Successfully connected to Slims
11:10:40 AM:WARNING:Dialogs:Dialogs.py:_LoadCalibrationParameters:line 509:could not find water calibration parameters: C:\Users\svc_aind_behavior\Documents\ForagingSettings\WaterCalibrationPar_4.json
11:10:40 AM:INFO:Foraging:Foraging.py:keyPressEvent:line 1880:processing parameter changes
11:10:40 AM:INFO:Foraging:Foraging.py:_InitializeMotorStage:line 857:Scanning for newscale stages
11:10:40 AM:WARNING:Foraging:Foraging.py:_InitializeMotorStage:line 867:Could not find any instances of NewScale Stage
11:10:40 AM:INFO:Foraging:Foraging.py:_insert_stage_widget:line 239:Inserting Stage Widget
11:10:40 AM:INFO:connection:connection.py:_connect:line 688:Connecting to aibspi(10.128.108.106):2181, use_ssl: False
11:10:40 AM:INFO:client:client.py:_session_callback:line 561:Zookeeper connection established, state: CONNECTED
11:10:40 AM:INFO:connection:connection.py:_connect_attempt:line 655:Closing connection to aibspi:2181
11:10:40 AM:INFO:client:client.py:_session_callback:line 567:Zookeeper session closed, state: CLOSED
11:10:40 AM:ERROR:stepper_motor_device:stepper_motor_device.py:__init__:line 58:Could not connect to device. Is the device connected or currently being used?

Full GUI log

11:10:35 AM:INFO:Foraging:Foraging.py:start_gui_log_file:line 4707:Starting logfile!
11:10:35 AM:INFO:Foraging:Foraging.py:log_git_hash:line 4718:Python version: 3.11.9 | packaged by Anaconda, Inc. | (main, Apr 19 2024, 16:40:41) [MSC v.1916 64 bit (AMD64)]
11:10:36 AM:INFO:Foraging:Foraging.py:log_git_hash:line 4735:Current git commit branch, hash: main, 4f4f59556389b4696a28bcbed810dec00816cf61
11:10:36 AM:INFO:Foraging:Foraging.py:log_git_hash:line 4739:Current foraging_gui version: 1.6.8
11:10:36 AM:WARNING:Foraging:Foraging.py:log_git_hash:line 4749:local repository is clean
11:10:36 AM:INFO:Foraging:Foraging.py:<module>:line 4850:Setting QApplication attributes
11:10:36 AM:INFO:Foraging:Foraging.py:<module>:line 4858:Starting QApplication and Window
11:10:36 AM:INFO:Foraging:Foraging.py:__init__:line 66:Creating Window
11:10:36 AM:INFO:Foraging:Foraging.py:_GetSettings:line 1156:Loaded settings_box file
11:10:36 AM:INFO:Foraging:Foraging.py:_GetSettings:line 1184:Loaded settings file
11:10:36 AM:WARNING:Foraging:Foraging.py:_GetSettings:line 1194:Missing setting (FIP_settings), using default: C:\Users\svc_aind_behavior\Documents\FIPSettings
11:10:36 AM:WARNING:Foraging:Foraging.py:_GetSettings:line 1194:Missing setting (bonsai_config_path), using default: C:\Users\svc_aind_behavior\Documents\GitHub\dynamic-foraging-task\bonsai\Bonsai.config
11:10:36 AM:WARNING:Foraging:Foraging.py:_GetSettings:line 1194:Missing setting (metadata_dialog_folder), using default: C:\Users\svc_aind_behavior\Documents\ForagingSettings\metadata_dialog\
11:10:36 AM:WARNING:Foraging:Foraging.py:_GetSettings:line 1194:Missing setting (rig_metadata_folder), using default: C:\Users\svc_aind_behavior\Documents\ForagingSettings\rig_metadata\
11:10:36 AM:WARNING:Foraging:Foraging.py:_GetSettings:line 1194:Missing setting (project_info_file), using default: C:\Users\svc_aind_behavior\Documents\ForagingSettings\Project Name and Funding Source v2.csv
11:10:36 AM:WARNING:Foraging:Foraging.py:_GetSettings:line 1194:Missing setting (schedule_path), using default: Z:\dynamic_foraging\DynamicForagingSchedule.csv
11:10:36 AM:WARNING:Foraging:Foraging.py:_GetSettings:line 1194:Missing setting (go_cue_decibel_box1), using default: 60
11:10:36 AM:WARNING:Foraging:Foraging.py:_GetSettings:line 1194:Missing setting (go_cue_decibel_box2), using default: 60
11:10:36 AM:WARNING:Foraging:Foraging.py:_GetSettings:line 1194:Missing setting (go_cue_decibel_box3), using default: 60
11:10:36 AM:WARNING:Foraging:Foraging.py:_GetSettings:line 1194:Missing setting (lick_spout_distance_box1), using default: 5000
11:10:36 AM:WARNING:Foraging:Foraging.py:_GetSettings:line 1194:Missing setting (lick_spout_distance_box2), using default: 5000
11:10:36 AM:WARNING:Foraging:Foraging.py:_GetSettings:line 1194:Missing setting (lick_spout_distance_box3), using default: 5000
11:10:36 AM:WARNING:Foraging:Foraging.py:_GetSettings:line 1194:Missing setting (lick_spout_distance_box4), using default: 5000
11:10:36 AM:WARNING:Foraging:Foraging.py:_GetSettings:line 1194:Missing setting (name_mapper_file), using default: C:\Users\svc_aind_behavior\Documents\ForagingSettings\name_mapper.json
11:10:36 AM:WARNING:Foraging:Foraging.py:_GetSettings:line 1194:Missing setting (create_rig_metadata), using default: True
11:10:36 AM:WARNING:Foraging:Foraging.py:_GetSettings:line 1194:Missing setting (save_each_trial), using default: True
11:10:36 AM:WARNING:Foraging:Foraging.py:_GetSettings:line 1194:Missing setting (AutomaticUpload), using default: True
11:10:36 AM:WARNING:Foraging:Foraging.py:_GetSettings:line 1194:Missing setting (manifest_flag_dir), using default: C:\Users\svc_aind_behavior\Documents\aind_watchdog_service\manifest
11:10:36 AM:WARNING:Foraging:Foraging.py:_GetSettings:line 1194:Missing setting (auto_engage), using default: True
11:10:36 AM:WARNING:Foraging:Foraging.py:_GetSettings:line 1194:Missing setting (clear_figure_after_save), using default: True
11:10:36 AM:WARNING:Foraging:Foraging.py:_GetSettings:line 1194:Missing setting (add_default_project_name), using default: True
11:10:36 AM:INFO:Foraging:Foraging.py:_LoadSchedule:line 1082:Loaded behavior schedule
11:10:36 AM:INFO:Foraging:Foraging.py:_GetWaterCalibration:line 1046:Loaded Water Calibration
11:10:36 AM:INFO:Foraging:Foraging.py:_load_most_recent_rig_json:line 1525:Found existing rig.json: rig_446-6-D_2024-11-05_11_08_20.json
11:10:36 AM:INFO:RigJsonBuilder:RigJsonBuilder.py:build_rig_json_core:line 60:building rig json
11:10:36 AM:INFO:RigJsonBuilder:RigJsonBuilder.py:build_rig_json_core:line 624:finished building rig json
11:10:36 AM:INFO:RigJsonBuilder:RigJsonBuilder.py:build_rig_json:line 53:Using existing rig json
11:10:36 AM:INFO:Foraging:Foraging.py:_LoadUI:line 259:Using ForagingGUI.ui interface
11:10:36 AM:INFO:Foraging:Foraging.py:__init__:line 107:Setting Window title: 446-6-D
11:10:36 AM:INFO:Foraging:Foraging.py:_InitializeBonsai:line 1353:Trying to connect to already running Bonsai
11:10:36 AM:INFO:Foraging:Foraging.py:_ConnectOSC:line 1406:connecting to GUI and Bonsai through OSC
11:10:37 AM:INFO:Foraging:Foraging.py:_InitializeBonsai:line 1357:Could not connect: timed out
11:10:37 AM:INFO:Foraging:Foraging.py:_InitializeBonsai:line 1368:Starting Bonsai
11:10:37 AM:INFO:Foraging:Foraging.py:log_subprocess_output:line 4822:BONSAI logging starting
11:10:37 AM:INFO:Foraging:Foraging.py:_ConnectOSC:line 1406:connecting to GUI and Bonsai through OSC
11:10:38 AM:INFO:Foraging:Foraging.py:_InitializeBonsai:line 1382:Could not connect, total waiting time 0.5 seconds: timed out
11:10:39 AM:INFO:Foraging:Foraging.py:_ConnectOSC:line 1406:connecting to GUI and Bonsai through OSC
11:10:39 AM:INFO:Foraging:Foraging.py:_InitializeBonsai:line 1385:Connected to Bonsai after 1.0 seconds
11:10:39 AM:INFO:Foraging:Foraging.py:_InitializeBonsai:line 1386:Bonsai started successfully
11:10:39 AM:INFO:Foraging:Foraging.py:_ConnectSlims:line 1263:Attempting to connect to Slims
11:10:39 AM:INFO:rigcontrol:rigcontrol.py:msg_handler:line 52:['/PhotometryFalling', 10206897.569536, '127.0.0.1', 4033], displaying at 0.5 Hz
11:10:39 AM:INFO:rigcontrol:rigcontrol.py:msg_handler:line 56:['/BehaviorEvent', 10206897.577504, '127.0.0.1', 4032]
11:10:39 AM:INFO:Foraging:Foraging.py:_ConnectSlims:line 1280:Successfully connected to Slims
11:10:40 AM:WARNING:Dialogs:Dialogs.py:_LoadCalibrationParameters:line 509:could not find water calibration parameters: C:\Users\svc_aind_behavior\Documents\ForagingSettings\WaterCalibrationPar_4.json
11:10:40 AM:INFO:Foraging:Foraging.py:keyPressEvent:line 1880:processing parameter changes
11:10:40 AM:INFO:Foraging:Foraging.py:_InitializeMotorStage:line 857:Scanning for newscale stages
11:10:40 AM:WARNING:Foraging:Foraging.py:_InitializeMotorStage:line 867:Could not find any instances of NewScale Stage
11:10:40 AM:INFO:Foraging:Foraging.py:_insert_stage_widget:line 239:Inserting Stage Widget
11:10:40 AM:INFO:connection:connection.py:_connect:line 688:Connecting to aibspi(10.128.108.106):2181, use_ssl: False
11:10:40 AM:INFO:client:client.py:_session_callback:line 561:Zookeeper connection established, state: CONNECTED
11:10:40 AM:INFO:connection:connection.py:_connect_attempt:line 655:Closing connection to aibspi:2181
11:10:40 AM:INFO:client:client.py:_session_callback:line 567:Zookeeper session closed, state: CLOSED
11:10:40 AM:ERROR:stepper_motor_device:stepper_motor_device.py:__init__:line 58:Could not connect to device. Is the device connected or currently being used?

alexpiet commented 1 week ago

This issue reoccurred:

file: stepper_motor_device.py
function: init
line 65
logfile: W10DT714688/W10DT714688-D_gui_log_2024-11-18_12-54-33.txt
boxes: 8D
count: 2
text: Could not connect to device. Is the device connected or currently being used?

GUI Log snippet (click for full log)

12:54:33 PM:INFO:RigJsonBuilder:RigJsonBuilder.py:build_rig_json_core:line 624:finished building rig json
12:54:33 PM:INFO:RigJsonBuilder:RigJsonBuilder.py:build_rig_json:line 53:Using existing rig json
12:54:33 PM:INFO:Foraging:Foraging.py:_LoadUI:line 275:Using ForagingGUI.ui interface
12:54:33 PM:INFO:Foraging:Foraging.py:__init__:line 119:Setting Window title: 446-8-D
12:54:33 PM:INFO:Foraging:Foraging.py:_InitializeBonsai:line 1363:Trying to connect to already running Bonsai
12:54:33 PM:INFO:Foraging:Foraging.py:_ConnectOSC:line 1410:connecting to GUI and Bonsai through OSC
12:54:33 PM:INFO:Foraging:Foraging.py:_InitializeBonsai:line 1370:Connected to already running Bonsai
12:54:33 PM:INFO:Foraging:Foraging.py:_InitializeBonsai:line 1371:Bonsai started successfully
12:54:33 PM:INFO:Foraging:Foraging.py:_ConnectSlims:line 1273:Attempting to connect to Slims
12:54:34 PM:INFO:Foraging:Foraging.py:_ConnectSlims:line 1290:Successfully connected to Slims
12:54:34 PM:WARNING:Dialogs:Dialogs.py:_LoadCalibrationParameters:line 507:could not find water calibration parameters: C:\Users\svc_aind_behavior\Documents\ForagingSettings\WaterCalibrationPar_4.json
12:54:34 PM:INFO:Foraging:Foraging.py:keyPressEvent:line 1881:processing parameter changes
12:54:34 PM:INFO:Foraging:Foraging.py:_InitializeMotorStage:line 867:Scanning for newscale stages
12:54:34 PM:INFO:Foraging:Foraging.py:_InitializeMotorStage:line 877:Could not find any instances of NewScale Stage
12:54:34 PM:INFO:Foraging:Foraging.py:_insert_stage_widget:line 255:Inserting Stage Widget
12:54:34 PM:INFO:connection:connection.py:_connect:line 688:Connecting to aibspi(10.128.108.106):2181, use_ssl: False
12:54:34 PM:INFO:client:client.py:_session_callback:line 561:Zookeeper connection established, state: CONNECTED
12:54:34 PM:INFO:connection:connection.py:_connect_attempt:line 655:Closing connection to aibspi:2181
12:54:34 PM:INFO:client:client.py:_session_callback:line 567:Zookeeper session closed, state: CLOSED
12:54:34 PM:ERROR:stepper_motor_device:stepper_motor_device.py:__init__:line 65:Could not connect to device. Is the device connected or currently being used?

Full GUI log

12:54:33 PM:INFO:Foraging:Foraging.py:start_gui_log_file:line 4679:Starting logfile!
12:54:33 PM:INFO:Foraging:Foraging.py:log_git_hash:line 4690:Python version: 3.11.9 | packaged by Anaconda, Inc. | (main, Apr 19 2024, 16:40:41) [MSC v.1916 64 bit (AMD64)]
12:54:33 PM:INFO:Foraging:Foraging.py:log_git_hash:line 4707:Current git commit branch, hash: main, 60f8beb5cf259b096e71331217b2a631d1eaeb43
12:54:33 PM:INFO:Foraging:Foraging.py:log_git_hash:line 4711:Current foraging_gui version: 1.6.9
12:54:33 PM:WARNING:Foraging:Foraging.py:log_git_hash:line 4721:local repository is clean
12:54:33 PM:INFO:Foraging:Foraging.py:<module>:line 4822:Setting QApplication attributes
12:54:33 PM:INFO:Foraging:Foraging.py:<module>:line 4830:Starting QApplication and Window
12:54:33 PM:INFO:Foraging:Foraging.py:__init__:line 69:Creating Window
12:54:33 PM:INFO:Foraging:Foraging.py:_GetSettings:line 1166:Loaded settings_box file
12:54:33 PM:INFO:Foraging:Foraging.py:_GetSettings:line 1194:Loaded settings file
12:54:33 PM:WARNING:Foraging:Foraging.py:_GetSettings:line 1204:Missing setting (FIP_settings), using default: C:\Users\svc_aind_behavior\Documents\FIPSettings
12:54:33 PM:WARNING:Foraging:Foraging.py:_GetSettings:line 1204:Missing setting (bonsai_config_path), using default: C:\Users\svc_aind_behavior\Documents\GitHub\dynamic-foraging-task\bonsai\Bonsai.config
12:54:33 PM:WARNING:Foraging:Foraging.py:_GetSettings:line 1204:Missing setting (metadata_dialog_folder), using default: C:\Users\svc_aind_behavior\Documents\ForagingSettings\metadata_dialog\
12:54:33 PM:WARNING:Foraging:Foraging.py:_GetSettings:line 1204:Missing setting (rig_metadata_folder), using default: C:\Users\svc_aind_behavior\Documents\ForagingSettings\rig_metadata\
12:54:33 PM:WARNING:Foraging:Foraging.py:_GetSettings:line 1204:Missing setting (project_info_file), using default: C:\Users\svc_aind_behavior\Documents\ForagingSettings\Project Name and Funding Source v2.csv
12:54:33 PM:WARNING:Foraging:Foraging.py:_GetSettings:line 1204:Missing setting (schedule_path), using default: Z:\dynamic_foraging\DynamicForagingSchedule.csv
12:54:33 PM:WARNING:Foraging:Foraging.py:_GetSettings:line 1204:Missing setting (go_cue_decibel_box1), using default: 60
12:54:33 PM:WARNING:Foraging:Foraging.py:_GetSettings:line 1204:Missing setting (go_cue_decibel_box2), using default: 60
12:54:33 PM:WARNING:Foraging:Foraging.py:_GetSettings:line 1204:Missing setting (go_cue_decibel_box3), using default: 60
12:54:33 PM:WARNING:Foraging:Foraging.py:_GetSettings:line 1204:Missing setting (lick_spout_distance_box1), using default: 5000
12:54:33 PM:WARNING:Foraging:Foraging.py:_GetSettings:line 1204:Missing setting (lick_spout_distance_box2), using default: 5000
12:54:33 PM:WARNING:Foraging:Foraging.py:_GetSettings:line 1204:Missing setting (lick_spout_distance_box3), using default: 5000
12:54:33 PM:WARNING:Foraging:Foraging.py:_GetSettings:line 1204:Missing setting (lick_spout_distance_box4), using default: 5000
12:54:33 PM:WARNING:Foraging:Foraging.py:_GetSettings:line 1204:Missing setting (name_mapper_file), using default: C:\Users\svc_aind_behavior\Documents\ForagingSettings\name_mapper.json
12:54:33 PM:WARNING:Foraging:Foraging.py:_GetSettings:line 1204:Missing setting (create_rig_metadata), using default: True
12:54:33 PM:WARNING:Foraging:Foraging.py:_GetSettings:line 1204:Missing setting (save_each_trial), using default: True
12:54:33 PM:WARNING:Foraging:Foraging.py:_GetSettings:line 1204:Missing setting (AutomaticUpload), using default: True
12:54:33 PM:WARNING:Foraging:Foraging.py:_GetSettings:line 1204:Missing setting (manifest_flag_dir), using default: C:\Users\svc_aind_behavior\Documents\aind_watchdog_service\manifest
12:54:33 PM:WARNING:Foraging:Foraging.py:_GetSettings:line 1204:Missing setting (auto_engage), using default: True
12:54:33 PM:WARNING:Foraging:Foraging.py:_GetSettings:line 1204:Missing setting (clear_figure_after_save), using default: True
12:54:33 PM:WARNING:Foraging:Foraging.py:_GetSettings:line 1204:Missing setting (add_default_project_name), using default: True
12:54:33 PM:INFO:Foraging:Foraging.py:_LoadSchedule:line 1092:Loaded behavior schedule
12:54:33 PM:INFO:Foraging:Foraging.py:_GetWaterCalibration:line 1056:Loaded Water Calibration
12:54:33 PM:INFO:Foraging:Foraging.py:_load_most_recent_rig_json:line 1526:Found existing rig.json: rig_446-8-D_2024-11-12_11_02_49.json
12:54:33 PM:INFO:RigJsonBuilder:RigJsonBuilder.py:build_rig_json_core:line 60:building rig json
12:54:33 PM:INFO:RigJsonBuilder:RigJsonBuilder.py:build_rig_json_core:line 624:finished building rig json
12:54:33 PM:INFO:RigJsonBuilder:RigJsonBuilder.py:build_rig_json:line 53:Using existing rig json
12:54:33 PM:INFO:Foraging:Foraging.py:_LoadUI:line 275:Using ForagingGUI.ui interface
12:54:33 PM:INFO:Foraging:Foraging.py:__init__:line 119:Setting Window title: 446-8-D
12:54:33 PM:INFO:Foraging:Foraging.py:_InitializeBonsai:line 1363:Trying to connect to already running Bonsai
12:54:33 PM:INFO:Foraging:Foraging.py:_ConnectOSC:line 1410:connecting to GUI and Bonsai through OSC
12:54:33 PM:INFO:Foraging:Foraging.py:_InitializeBonsai:line 1370:Connected to already running Bonsai
12:54:33 PM:INFO:Foraging:Foraging.py:_InitializeBonsai:line 1371:Bonsai started successfully
12:54:33 PM:INFO:Foraging:Foraging.py:_ConnectSlims:line 1273:Attempting to connect to Slims
12:54:34 PM:INFO:Foraging:Foraging.py:_ConnectSlims:line 1290:Successfully connected to Slims
12:54:34 PM:WARNING:Dialogs:Dialogs.py:_LoadCalibrationParameters:line 507:could not find water calibration parameters: C:\Users\svc_aind_behavior\Documents\ForagingSettings\WaterCalibrationPar_4.json
12:54:34 PM:INFO:Foraging:Foraging.py:keyPressEvent:line 1881:processing parameter changes
12:54:34 PM:INFO:Foraging:Foraging.py:_InitializeMotorStage:line 867:Scanning for newscale stages
12:54:34 PM:INFO:Foraging:Foraging.py:_InitializeMotorStage:line 877:Could not find any instances of NewScale Stage
12:54:34 PM:INFO:Foraging:Foraging.py:_insert_stage_widget:line 255:Inserting Stage Widget
12:54:34 PM:INFO:connection:connection.py:_connect:line 688:Connecting to aibspi(10.128.108.106):2181, use_ssl: False
12:54:34 PM:INFO:client:client.py:_session_callback:line 561:Zookeeper connection established, state: CONNECTED
12:54:34 PM:INFO:connection:connection.py:_connect_attempt:line 655:Closing connection to aibspi:2181
12:54:34 PM:INFO:client:client.py:_session_callback:line 567:Zookeeper session closed, state: CLOSED
12:54:34 PM:ERROR:stepper_motor_device:stepper_motor_device.py:__init__:line 65:Could not connect to device. Is the device connected or currently being used?

ellahiltonvano commented 1 week ago

@jessy-liao this issue is still happening after updating stagewidget this week

alexpiet commented 5 days ago

This issue reoccurred:

file: stepper_motor_device.py
function: init
line 65
logfile: W10DT714670/W10DT714670-A_gui_log_2024-11-21_19-42-09.txt
boxes: 8C, ephys4
count: 3
text: Could not connect to device. Is the device connected or currently being used?

GUI Log snippet (click for full log)

07:42:12 PM:INFO:Foraging:Foraging.py:_InitializeBonsai:line 1398:Could not connect, total waiting time 0.5 seconds: timed out
07:42:13 PM:INFO:Foraging:Foraging.py:_ConnectOSC:line 1418:connecting to GUI and Bonsai through OSC
07:42:14 PM:INFO:Foraging:Foraging.py:_InitializeBonsai:line 1398:Could not connect, total waiting time 1.0 seconds: timed out
07:42:14 PM:INFO:Foraging:Foraging.py:_ConnectOSC:line 1418:connecting to GUI and Bonsai through OSC
07:42:15 PM:INFO:Foraging:Foraging.py:_InitializeBonsai:line 1398:Could not connect, total waiting time 1.5 seconds: timed out
07:42:16 PM:INFO:Foraging:Foraging.py:_ConnectOSC:line 1418:connecting to GUI and Bonsai through OSC
07:42:16 PM:INFO:Foraging:Foraging.py:_InitializeBonsai:line 1401:Connected to Bonsai after 2.0 seconds
07:42:16 PM:INFO:Foraging:Foraging.py:_InitializeBonsai:line 1402:Bonsai started successfully
07:42:16 PM:INFO:Foraging:Foraging.py:_ConnectSlims:line 1281:Attempting to connect to Slims
07:42:16 PM:INFO:Foraging:Foraging.py:_ConnectSlims:line 1298:Successfully connected to Slims
07:42:16 PM:WARNING:Dialogs:Dialogs.py:_LoadCalibrationParameters:line 480:could not find water calibration parameters: C:\Users\svc_aind_ephys\Documents\ForagingSettings\WaterCalibrationPar_1.json
07:42:17 PM:INFO:Foraging:Foraging.py:keyPressEvent:line 1863:processing parameter changes
07:42:17 PM:INFO:Foraging:Foraging.py:_InitializeMotorStage:line 875:Scanning for newscale stages
07:42:17 PM:INFO:Foraging:Foraging.py:_InitializeMotorStage:line 885:Could not find any instances of NewScale Stage
07:42:17 PM:INFO:Foraging:Foraging.py:_insert_stage_widget:line 255:Inserting Stage Widget
07:42:17 PM:INFO:connection:connection.py:_connect:line 688:Connecting to aibspi(10.128.108.106):2181, use_ssl: False
07:42:17 PM:INFO:client:client.py:_session_callback:line 561:Zookeeper connection established, state: CONNECTED
07:42:17 PM:INFO:connection:connection.py:_connect_attempt:line 655:Closing connection to aibspi:2181
07:42:17 PM:INFO:client:client.py:_session_callback:line 567:Zookeeper session closed, state: CLOSED
07:42:17 PM:ERROR:stepper_motor_device:stepper_motor_device.py:__init__:line 65:Could not connect to device. Is the device connected or currently being used?

Full GUI log

07:42:09 PM:INFO:Foraging:Foraging.py:start_gui_log_file:line 4661:Starting logfile!
07:42:09 PM:INFO:Foraging:Foraging.py:log_git_hash:line 4672:Python version: 3.11.9 | packaged by conda-forge | (main, Apr 19 2024, 18:27:10) [MSC v.1938 64 bit (AMD64)]
07:42:09 PM:INFO:Foraging:Foraging.py:log_git_hash:line 4689:Current git commit branch, hash: main, 1a7c9d3d1aa10284caed44ba9b223c6bfbb8ff5f
07:42:09 PM:INFO:Foraging:Foraging.py:log_git_hash:line 4693:Current foraging_gui version: 1.6.10
07:42:09 PM:WARNING:Foraging:Foraging.py:log_git_hash:line 4703:local repository is clean
07:42:09 PM:INFO:Foraging:Foraging.py:<module>:line 4804:Setting QApplication attributes
07:42:09 PM:INFO:Foraging:Foraging.py:<module>:line 4812:Starting QApplication and Window
07:42:09 PM:INFO:Foraging:Foraging.py:__init__:line 69:Creating Window
07:42:09 PM:INFO:Foraging:Foraging.py:_GetSettings:line 1174:Loaded settings_box file
07:42:09 PM:INFO:Foraging:Foraging.py:_GetSettings:line 1202:Loaded settings file
07:42:09 PM:WARNING:Foraging:Foraging.py:_GetSettings:line 1212:Missing setting (FIP_workflow_path), using default: 
07:42:09 PM:WARNING:Foraging:Foraging.py:_GetSettings:line 1212:Missing setting (FIP_settings), using default: C:\Users\svc_aind_ephys\Documents\FIPSettings
07:42:09 PM:WARNING:Foraging:Foraging.py:_GetSettings:line 1212:Missing setting (bonsai_config_path), using default: C:\Users\svc_aind_ephys\Documents\GitHub\dynamic-foraging-task\bonsai\Bonsai.config
07:42:09 PM:WARNING:Foraging:Foraging.py:_GetSettings:line 1212:Missing setting (metadata_dialog_folder), using default: C:\Users\svc_aind_ephys\Documents\ForagingSettings\metadata_dialog\
07:42:09 PM:WARNING:Foraging:Foraging.py:_GetSettings:line 1212:Missing setting (rig_metadata_folder), using default: C:\Users\svc_aind_ephys\Documents\ForagingSettings\rig_metadata\
07:42:09 PM:WARNING:Foraging:Foraging.py:_GetSettings:line 1212:Missing setting (project_info_file), using default: C:\Users\svc_aind_ephys\Documents\ForagingSettings\Project Name and Funding Source v2.csv
07:42:09 PM:WARNING:Foraging:Foraging.py:_GetSettings:line 1212:Missing setting (schedule_path), using default: Z:\dynamic_foraging\DynamicForagingSchedule.csv
07:42:09 PM:WARNING:Foraging:Foraging.py:_GetSettings:line 1212:Missing setting (go_cue_decibel_box2), using default: 60
07:42:09 PM:WARNING:Foraging:Foraging.py:_GetSettings:line 1212:Missing setting (go_cue_decibel_box3), using default: 60
07:42:09 PM:WARNING:Foraging:Foraging.py:_GetSettings:line 1212:Missing setting (go_cue_decibel_box4), using default: 60
07:42:09 PM:WARNING:Foraging:Foraging.py:_GetSettings:line 1212:Missing setting (lick_spout_distance_box1), using default: 5000
07:42:09 PM:WARNING:Foraging:Foraging.py:_GetSettings:line 1212:Missing setting (lick_spout_distance_box2), using default: 5000
07:42:09 PM:WARNING:Foraging:Foraging.py:_GetSettings:line 1212:Missing setting (lick_spout_distance_box3), using default: 5000
07:42:09 PM:WARNING:Foraging:Foraging.py:_GetSettings:line 1212:Missing setting (lick_spout_distance_box4), using default: 5000
07:42:09 PM:WARNING:Foraging:Foraging.py:_GetSettings:line 1212:Missing setting (name_mapper_file), using default: C:\Users\svc_aind_ephys\Documents\ForagingSettings\name_mapper.json
07:42:09 PM:WARNING:Foraging:Foraging.py:_GetSettings:line 1212:Missing setting (save_each_trial), using default: True
07:42:09 PM:WARNING:Foraging:Foraging.py:_GetSettings:line 1212:Missing setting (manifest_flag_dir), using default: C:\Users\svc_aind_ephys\Documents\aind_watchdog_service\manifest
07:42:09 PM:WARNING:Foraging:Foraging.py:_GetSettings:line 1212:Missing setting (auto_engage), using default: True
07:42:09 PM:WARNING:Foraging:Foraging.py:_GetSettings:line 1212:Missing setting (clear_figure_after_save), using default: True
07:42:09 PM:WARNING:Foraging:Foraging.py:_GetSettings:line 1212:Missing setting (add_default_project_name), using default: True
07:42:09 PM:INFO:Foraging:Foraging.py:_LoadSchedule:line 1100:Loaded behavior schedule
07:42:09 PM:INFO:Foraging:Foraging.py:_GetWaterCalibration:line 1064:Loaded Water Calibration
07:42:09 PM:INFO:Foraging:Foraging.py:_LoadRigJson:line 1544:Skipping rig metadata creation because create_rig_metadata=False
07:42:10 PM:INFO:Foraging:Foraging.py:_LoadUI:line 275:Using ForagingGUI.ui interface
07:42:10 PM:INFO:Foraging:Foraging.py:__init__:line 119:Setting Window title: 322_EPHYS4
07:42:10 PM:INFO:Foraging:Foraging.py:_InitializeBonsai:line 1371:Trying to connect to already running Bonsai
07:42:10 PM:INFO:Foraging:Foraging.py:_ConnectOSC:line 1418:connecting to GUI and Bonsai through OSC
07:42:11 PM:INFO:Foraging:Foraging.py:_InitializeBonsai:line 1375:Could not connect: timed out
07:42:11 PM:INFO:Foraging:Foraging.py:_InitializeBonsai:line 1384:Starting Bonsai
07:42:11 PM:INFO:Foraging:Foraging.py:log_subprocess_output:line 4776:BONSAI logging starting
07:42:11 PM:INFO:Foraging:Foraging.py:_ConnectOSC:line 1418:connecting to GUI and Bonsai through OSC
07:42:12 PM:INFO:Foraging:Foraging.py:_InitializeBonsai:line 1398:Could not connect, total waiting time 0.5 seconds: timed out
07:42:13 PM:INFO:Foraging:Foraging.py:_ConnectOSC:line 1418:connecting to GUI and Bonsai through OSC
07:42:14 PM:INFO:Foraging:Foraging.py:_InitializeBonsai:line 1398:Could not connect, total waiting time 1.0 seconds: timed out
07:42:14 PM:INFO:Foraging:Foraging.py:_ConnectOSC:line 1418:connecting to GUI and Bonsai through OSC
07:42:15 PM:INFO:Foraging:Foraging.py:_InitializeBonsai:line 1398:Could not connect, total waiting time 1.5 seconds: timed out
07:42:16 PM:INFO:Foraging:Foraging.py:_ConnectOSC:line 1418:connecting to GUI and Bonsai through OSC
07:42:16 PM:INFO:Foraging:Foraging.py:_InitializeBonsai:line 1401:Connected to Bonsai after 2.0 seconds
07:42:16 PM:INFO:Foraging:Foraging.py:_InitializeBonsai:line 1402:Bonsai started successfully
07:42:16 PM:INFO:Foraging:Foraging.py:_ConnectSlims:line 1281:Attempting to connect to Slims
07:42:16 PM:INFO:Foraging:Foraging.py:_ConnectSlims:line 1298:Successfully connected to Slims
07:42:16 PM:WARNING:Dialogs:Dialogs.py:_LoadCalibrationParameters:line 480:could not find water calibration parameters: C:\Users\svc_aind_ephys\Documents\ForagingSettings\WaterCalibrationPar_1.json
07:42:17 PM:INFO:Foraging:Foraging.py:keyPressEvent:line 1863:processing parameter changes
07:42:17 PM:INFO:Foraging:Foraging.py:_InitializeMotorStage:line 875:Scanning for newscale stages
07:42:17 PM:INFO:Foraging:Foraging.py:_InitializeMotorStage:line 885:Could not find any instances of NewScale Stage
07:42:17 PM:INFO:Foraging:Foraging.py:_insert_stage_widget:line 255:Inserting Stage Widget
07:42:17 PM:INFO:connection:connection.py:_connect:line 688:Connecting to aibspi(10.128.108.106):2181, use_ssl: False
07:42:17 PM:INFO:client:client.py:_session_callback:line 561:Zookeeper connection established, state: CONNECTED
07:42:17 PM:INFO:connection:connection.py:_connect_attempt:line 655:Closing connection to aibspi:2181
07:42:17 PM:INFO:client:client.py:_session_callback:line 567:Zookeeper session closed, state: CLOSED
07:42:17 PM:ERROR:stepper_motor_device:stepper_motor_device.py:__init__:line 65:Could not connect to device. Is the device connected or currently being used?

ellahiltonvano commented 5 days ago

@jessy-liao same for this issue

alexpiet commented 4 days ago

This issue reoccurred:

file: stepper_motor_device.py
function: init
line 65
logfile: W10DT714673/W10DT714673-C_gui_log_2024-11-25_12-49-39.txt
boxes: 6C
count: 1
text: Could not connect to device. Is the device connected or currently being used?

GUI Log snippet (click for full log)

12:49:39 PM:INFO:RigJsonBuilder:RigJsonBuilder.py:build_rig_json_core:line 60:building rig json
12:49:39 PM:INFO:RigJsonBuilder:RigJsonBuilder.py:build_rig_json_core:line 624:finished building rig json
12:49:39 PM:INFO:RigJsonBuilder:RigJsonBuilder.py:build_rig_json:line 53:Using existing rig json
12:49:39 PM:INFO:Foraging:Foraging.py:_LoadUI:line 293:Using ForagingGUI.ui interface
12:49:39 PM:INFO:Foraging:Foraging.py:__init__:line 137:Setting Window title: 446-6-C
12:49:39 PM:INFO:Foraging:Foraging.py:_InitializeBonsai:line 1402:Trying to connect to already running Bonsai
12:49:39 PM:INFO:Foraging:Foraging.py:_ConnectOSC:line 1449:connecting to GUI and Bonsai through OSC
12:49:39 PM:INFO:Foraging:Foraging.py:_InitializeBonsai:line 1409:Connected to already running Bonsai
12:49:39 PM:INFO:Foraging:Foraging.py:_InitializeBonsai:line 1410:Bonsai started successfully
12:49:39 PM:INFO:Foraging:Foraging.py:_ConnectSlims:line 1312:Attempting to connect to Slims
12:49:40 PM:INFO:Foraging:Foraging.py:_ConnectSlims:line 1329:Successfully connected to Slims
12:49:40 PM:WARNING:Dialogs:Dialogs.py:_LoadCalibrationParameters:line 480:could not find water calibration parameters: C:\Users\svc_aind_behavior\Documents\ForagingSettings\WaterCalibrationPar_3.json
12:49:40 PM:INFO:Foraging:Foraging.py:_InitializeMotorStage:line 906:Scanning for newscale stages
12:49:40 PM:INFO:Foraging:Foraging.py:_InitializeMotorStage:line 916:Could not find any instances of NewScale Stage
12:49:40 PM:INFO:Foraging:Foraging.py:_insert_stage_widget:line 273:Inserting Stage Widget
12:49:40 PM:INFO:connection:connection.py:_connect:line 688:Connecting to aibspi(10.128.108.106):2181, use_ssl: False
12:49:40 PM:INFO:client:client.py:_session_callback:line 561:Zookeeper connection established, state: CONNECTED
12:49:40 PM:INFO:connection:connection.py:_connect_attempt:line 655:Closing connection to aibspi:2181
12:49:40 PM:INFO:client:client.py:_session_callback:line 567:Zookeeper session closed, state: CLOSED
12:49:40 PM:ERROR:stepper_motor_device:stepper_motor_device.py:__init__:line 65:Could not connect to device. Is the device connected or currently being used?

Full GUI log

12:49:39 PM:INFO:Foraging:Foraging.py:start_gui_log_file:line 4753:Starting logfile!
12:49:39 PM:INFO:Foraging:Foraging.py:log_git_hash:line 4764:Python version: 3.11.10 | packaged by Anaconda, Inc. | (main, Oct  3 2024, 07:22:26) [MSC v.1929 64 bit (AMD64)]
12:49:39 PM:INFO:Foraging:Foraging.py:log_git_hash:line 4781:Current git commit branch, hash: production_testing, 66edb6f236fce48d1c816fba8b3b07bf528611c9
12:49:39 PM:INFO:Foraging:Foraging.py:log_git_hash:line 4785:Current foraging_gui version: 1.6.10
12:49:39 PM:WARNING:Foraging:Foraging.py:log_git_hash:line 4792:local repository has untracked changes to the following files: bonsai/Bonsai.config
12:49:39 PM:INFO:Foraging:Foraging.py:<module>:line 4896:Setting QApplication attributes
12:49:39 PM:INFO:Foraging:Foraging.py:<module>:line 4904:Starting QApplication and Window
12:49:39 PM:INFO:Foraging:Foraging.py:__init__:line 71:Creating Window
12:49:39 PM:INFO:Foraging:Foraging.py:_GetSettings:line 1205:Loaded settings_box file
12:49:39 PM:INFO:Foraging:Foraging.py:_GetSettings:line 1233:Loaded settings file
12:49:39 PM:WARNING:Foraging:Foraging.py:_GetSettings:line 1243:Missing setting (FIP_workflow_path), using default: 
12:49:39 PM:WARNING:Foraging:Foraging.py:_GetSettings:line 1243:Missing setting (FIP_settings), using default: C:\Users\svc_aind_behavior\Documents\FIPSettings
12:49:39 PM:WARNING:Foraging:Foraging.py:_GetSettings:line 1243:Missing setting (bonsai_config_path), using default: C:\Users\svc_aind_behavior\Documents\GitHub\dynamic-foraging-task\bonsai\Bonsai.config
12:49:39 PM:WARNING:Foraging:Foraging.py:_GetSettings:line 1243:Missing setting (metadata_dialog_folder), using default: C:\Users\svc_aind_behavior\Documents\ForagingSettings\metadata_dialog\
12:49:39 PM:WARNING:Foraging:Foraging.py:_GetSettings:line 1243:Missing setting (rig_metadata_folder), using default: C:\Users\svc_aind_behavior\Documents\ForagingSettings\rig_metadata\
12:49:39 PM:WARNING:Foraging:Foraging.py:_GetSettings:line 1243:Missing setting (project_info_file), using default: C:\Users\svc_aind_behavior\Documents\ForagingSettings\Project Name and Funding Source v2.csv
12:49:39 PM:WARNING:Foraging:Foraging.py:_GetSettings:line 1243:Missing setting (schedule_path), using default: Z:\dynamic_foraging\DynamicForagingSchedule.csv
12:49:39 PM:WARNING:Foraging:Foraging.py:_GetSettings:line 1243:Missing setting (go_cue_decibel_box1), using default: 60
12:49:39 PM:WARNING:Foraging:Foraging.py:_GetSettings:line 1243:Missing setting (go_cue_decibel_box2), using default: 60
12:49:39 PM:WARNING:Foraging:Foraging.py:_GetSettings:line 1243:Missing setting (go_cue_decibel_box3), using default: 60
12:49:39 PM:WARNING:Foraging:Foraging.py:_GetSettings:line 1243:Missing setting (go_cue_decibel_box4), using default: 60
12:49:39 PM:WARNING:Foraging:Foraging.py:_GetSettings:line 1243:Missing setting (lick_spout_distance_box1), using default: 5000
12:49:39 PM:WARNING:Foraging:Foraging.py:_GetSettings:line 1243:Missing setting (lick_spout_distance_box2), using default: 5000
12:49:39 PM:WARNING:Foraging:Foraging.py:_GetSettings:line 1243:Missing setting (lick_spout_distance_box3), using default: 5000
12:49:39 PM:WARNING:Foraging:Foraging.py:_GetSettings:line 1243:Missing setting (lick_spout_distance_box4), using default: 5000
12:49:39 PM:WARNING:Foraging:Foraging.py:_GetSettings:line 1243:Missing setting (name_mapper_file), using default: C:\Users\svc_aind_behavior\Documents\ForagingSettings\name_mapper.json
12:49:39 PM:WARNING:Foraging:Foraging.py:_GetSettings:line 1243:Missing setting (create_rig_metadata), using default: True
12:49:39 PM:WARNING:Foraging:Foraging.py:_GetSettings:line 1243:Missing setting (save_each_trial), using default: True
12:49:39 PM:WARNING:Foraging:Foraging.py:_GetSettings:line 1243:Missing setting (AutomaticUpload), using default: True
12:49:39 PM:WARNING:Foraging:Foraging.py:_GetSettings:line 1243:Missing setting (manifest_flag_dir), using default: C:\Users\svc_aind_behavior\Documents\aind_watchdog_service\manifest
12:49:39 PM:WARNING:Foraging:Foraging.py:_GetSettings:line 1243:Missing setting (auto_engage), using default: True
12:49:39 PM:WARNING:Foraging:Foraging.py:_GetSettings:line 1243:Missing setting (clear_figure_after_save), using default: True
12:49:39 PM:WARNING:Foraging:Foraging.py:_GetSettings:line 1243:Missing setting (add_default_project_name), using default: True
12:49:39 PM:INFO:Foraging:Foraging.py:_LoadSchedule:line 1131:Loaded behavior schedule
12:49:39 PM:INFO:Foraging:Foraging.py:_GetWaterCalibration:line 1095:Loaded Water Calibration
12:49:39 PM:INFO:Foraging:Foraging.py:_load_most_recent_rig_json:line 1565:Found existing rig.json: rig_446-6-C_2024-11-25_12_49_00.json
12:49:39 PM:INFO:RigJsonBuilder:RigJsonBuilder.py:build_rig_json_core:line 60:building rig json
12:49:39 PM:INFO:RigJsonBuilder:RigJsonBuilder.py:build_rig_json_core:line 624:finished building rig json
12:49:39 PM:INFO:RigJsonBuilder:RigJsonBuilder.py:build_rig_json:line 53:Using existing rig json
12:49:39 PM:INFO:Foraging:Foraging.py:_LoadUI:line 293:Using ForagingGUI.ui interface
12:49:39 PM:INFO:Foraging:Foraging.py:__init__:line 137:Setting Window title: 446-6-C
12:49:39 PM:INFO:Foraging:Foraging.py:_InitializeBonsai:line 1402:Trying to connect to already running Bonsai
12:49:39 PM:INFO:Foraging:Foraging.py:_ConnectOSC:line 1449:connecting to GUI and Bonsai through OSC
12:49:39 PM:INFO:Foraging:Foraging.py:_InitializeBonsai:line 1409:Connected to already running Bonsai
12:49:39 PM:INFO:Foraging:Foraging.py:_InitializeBonsai:line 1410:Bonsai started successfully
12:49:39 PM:INFO:Foraging:Foraging.py:_ConnectSlims:line 1312:Attempting to connect to Slims
12:49:40 PM:INFO:Foraging:Foraging.py:_ConnectSlims:line 1329:Successfully connected to Slims
12:49:40 PM:WARNING:Dialogs:Dialogs.py:_LoadCalibrationParameters:line 480:could not find water calibration parameters: C:\Users\svc_aind_behavior\Documents\ForagingSettings\WaterCalibrationPar_3.json
12:49:40 PM:INFO:Foraging:Foraging.py:_InitializeMotorStage:line 906:Scanning for newscale stages
12:49:40 PM:INFO:Foraging:Foraging.py:_InitializeMotorStage:line 916:Could not find any instances of NewScale Stage
12:49:40 PM:INFO:Foraging:Foraging.py:_insert_stage_widget:line 273:Inserting Stage Widget
12:49:40 PM:INFO:connection:connection.py:_connect:line 688:Connecting to aibspi(10.128.108.106):2181, use_ssl: False
12:49:40 PM:INFO:client:client.py:_session_callback:line 561:Zookeeper connection established, state: CONNECTED
12:49:40 PM:INFO:connection:connection.py:_connect_attempt:line 655:Closing connection to aibspi:2181
12:49:40 PM:INFO:client:client.py:_session_callback:line 567:Zookeeper session closed, state: CLOSED
12:49:40 PM:ERROR:stepper_motor_device:stepper_motor_device.py:__init__:line 65:Could not connect to device. Is the device connected or currently being used?

ellahiltonvano commented 3 days ago

@jessy-liao this is still happening frequently, do you have an idea of what the issue is?

jessy-liao commented 3 days ago

@ellahiltonvano Yeah I am investigating on a new fix. Sonya let me know that Bonsai might be interfering with the stage widget from communicating with the harp devices.

I am currently working on a code snippet to test and prove this theory before pushing a new code change.