Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Window.sessionGenerated[Session].emit(): argument 1 has unexpected type 'NoneType' #1233

Open
alexpiet opened this issue Dec 23, 2024 · 4 comments
Assignees
Labels
low priority - auto-generated autogenerated issues that have only occurred once

Comments

@alexpiet
Copy link
Collaborator

This issue was automatically generated from GUI logs.

file: Foraging.py
function: _Save
line 2709
logfile: W10DT714670/W10DT714670-A_gui_log_2024-12-19_16-09-29.txt
boxes: ephys4
count: 1
text: TypeError: Window.sessionGenerated[Session].emit(): argument 1 has unexpected type 'NoneType'

GUI Log snippet (click for full log)

04:10:07 PM:INFO:GenerateMetadata:GenerateMetadata.py:_get_behavior_stream:line 1085:No behavior data detected!
04:10:07 PM:INFO:GenerateMetadata:GenerateMetadata.py:_get_ephys_stream:line 969:No ephys data stream detected!
04:10:07 PM:INFO:GenerateMetadata:GenerateMetadata.py:_get_ophys_stream:line 646:No photometry data stream detected!
04:10:07 PM:INFO:GenerateMetadata:GenerateMetadata.py:_get_high_speed_camera_stream:line 624:No camera data stream detected!
04:10:07 PM:INFO:GenerateMetadata:GenerateMetadata.py:_session:line 520:session start time or session end time is empty!
04:10:07 PM:INFO:GenerateMetadata:GenerateMetadata.py:__init__:line 114:Session metadata generated successfully: False
04:10:07 PM:INFO:GenerateMetadata:GenerateMetadata.py:__init__:line 115:Rig metadata generated successfully: True
04:10:07 PM:INFO:GenerateMetadata:GenerateMetadata.py:_get_reward_delivery:line 1297:No reward delivery metadata found!
04:10:07 PM:INFO:GenerateMetadata:GenerateMetadata.py:_get_behavior_stream:line 1085:No behavior data detected!
04:10:07 PM:INFO:GenerateMetadata:GenerateMetadata.py:_get_ephys_stream:line 969:No ephys data stream detected!
04:10:07 PM:INFO:GenerateMetadata:GenerateMetadata.py:_get_ophys_stream:line 646:No photometry data stream detected!
04:10:07 PM:INFO:GenerateMetadata:GenerateMetadata.py:_get_high_speed_camera_stream:line 624:No camera data stream detected!
04:10:07 PM:INFO:GenerateMetadata:GenerateMetadata.py:_session:line 520:session start time or session end time is empty!
04:10:07 PM:WARNING:Foraging:Foraging.py:_Save:line 2707:Meta data is not saved!
04:10:07 PM:ERROR:Foraging:Foraging.py:_Save:line 2708:Error generating session metadata: Window.sessionGenerated[Session].emit(): argument 1 has unexpected type 'NoneType'
04:10:07 PM:ERROR:Foraging:Foraging.py:_Save:line 2709:Traceback (most recent call last):
  File "C:\Users\svc_aind_ephys\Documents\GitHub\dynamic-foraging-task\src\foraging_gui\Foraging.py", line 2691, in _Save
    self.sessionGenerated.emit(session)   # emit sessionGenerated
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: Window.sessionGenerated[Session].emit(): argument 1 has unexpected type 'NoneType'
Full GUI log
04:09:29 PM:INFO:Foraging:Foraging.py:start_gui_log_file:line 4796:Starting logfile!
04:09:29 PM:INFO:Foraging:Foraging.py:log_git_hash:line 4807:Python version: 3.11.9 | packaged by conda-forge | (main, Apr 19 2024, 18:27:10) [MSC v.1938 64 bit (AMD64)]
04:09:30 PM:INFO:Foraging:Foraging.py:log_git_hash:line 4824:Current git commit branch, hash: main, 698fb9fecded812fcf96d570658d9bc3766b14c6
04:09:30 PM:INFO:Foraging:Foraging.py:log_git_hash:line 4828:Current foraging_gui version: 1.6.19
04:09:30 PM:WARNING:Foraging:Foraging.py:log_git_hash:line 4838:local repository is clean
04:09:30 PM:INFO:Foraging:Foraging.py:<module>:line 4944:Setting QApplication attributes
04:09:30 PM:INFO:Foraging:Foraging.py:<module>:line 4952:Starting QApplication and Window
04:09:30 PM:INFO:Foraging:Foraging.py:__init__:line 77:Creating Window
04:09:30 PM:INFO:Foraging:Foraging.py:_GetSettings:line 1211:Loaded settings_box file
04:09:30 PM:INFO:Foraging:Foraging.py:_GetSettings:line 1239:Loaded settings file
04:09:30 PM:WARNING:Foraging:Foraging.py:_GetSettings:line 1249:Missing setting (FIP_workflow_path), using default: 
04:09:30 PM:WARNING:Foraging:Foraging.py:_GetSettings:line 1249:Missing setting (FIP_settings), using default: C:\Users\svc_aind_ephys\Documents\FIPSettings
04:09:30 PM:WARNING:Foraging:Foraging.py:_GetSettings:line 1249:Missing setting (bonsai_config_path), using default: C:\Users\svc_aind_ephys\Documents\GitHub\dynamic-foraging-task\bonsai\Bonsai.config
04:09:30 PM:WARNING:Foraging:Foraging.py:_GetSettings:line 1249:Missing setting (metadata_dialog_folder), using default: C:\Users\svc_aind_ephys\Documents\ForagingSettings\metadata_dialog\
04:09:30 PM:WARNING:Foraging:Foraging.py:_GetSettings:line 1249:Missing setting (rig_metadata_folder), using default: C:\Users\svc_aind_ephys\Documents\ForagingSettings\rig_metadata\
04:09:30 PM:WARNING:Foraging:Foraging.py:_GetSettings:line 1249:Missing setting (project_info_file), using default: C:\Users\svc_aind_ephys\Documents\ForagingSettings\Project Name and Funding Source v2.csv
04:09:30 PM:WARNING:Foraging:Foraging.py:_GetSettings:line 1249:Missing setting (schedule_path), using default: Z:\dynamic_foraging\DynamicForagingSchedule.csv
04:09:30 PM:WARNING:Foraging:Foraging.py:_GetSettings:line 1249:Missing setting (go_cue_decibel_box2), using default: 60
04:09:30 PM:WARNING:Foraging:Foraging.py:_GetSettings:line 1249:Missing setting (go_cue_decibel_box3), using default: 60
04:09:30 PM:WARNING:Foraging:Foraging.py:_GetSettings:line 1249:Missing setting (go_cue_decibel_box4), using default: 60
04:09:30 PM:WARNING:Foraging:Foraging.py:_GetSettings:line 1249:Missing setting (lick_spout_distance_box1), using default: 5000
04:09:30 PM:WARNING:Foraging:Foraging.py:_GetSettings:line 1249:Missing setting (lick_spout_distance_box2), using default: 5000
04:09:30 PM:WARNING:Foraging:Foraging.py:_GetSettings:line 1249:Missing setting (lick_spout_distance_box3), using default: 5000
04:09:30 PM:WARNING:Foraging:Foraging.py:_GetSettings:line 1249:Missing setting (lick_spout_distance_box4), using default: 5000
04:09:30 PM:WARNING:Foraging:Foraging.py:_GetSettings:line 1249:Missing setting (name_mapper_file), using default: C:\Users\svc_aind_ephys\Documents\ForagingSettings\name_mapper.json
04:09:30 PM:WARNING:Foraging:Foraging.py:_GetSettings:line 1249:Missing setting (save_each_trial), using default: True
04:09:30 PM:WARNING:Foraging:Foraging.py:_GetSettings:line 1249:Missing setting (manifest_flag_dir), using default: C:\Users\svc_aind_ephys\Documents\aind_watchdog_service\manifest
04:09:30 PM:WARNING:Foraging:Foraging.py:_GetSettings:line 1249:Missing setting (auto_engage), using default: True
04:09:30 PM:WARNING:Foraging:Foraging.py:_GetSettings:line 1249:Missing setting (clear_figure_after_save), using default: True
04:09:30 PM:WARNING:Foraging:Foraging.py:_GetSettings:line 1249:Missing setting (add_default_project_name), using default: True
04:09:30 PM:INFO:Foraging:Foraging.py:_LoadSchedule:line 1137:Loaded behavior schedule
04:09:30 PM:INFO:Foraging:Foraging.py:_GetWaterCalibration:line 1101:Loaded Water Calibration
04:09:30 PM:INFO:Foraging:Foraging.py:_LoadRigJson:line 1582:Skipping rig metadata creation because create_rig_metadata=False
04:09:30 PM:INFO:Foraging:Foraging.py:_LoadUI:line 299:Using ForagingGUI.ui interface
04:09:30 PM:INFO:Foraging:Foraging.py:__init__:line 143:Setting Window title: 322_EPHYS4
04:09:30 PM:INFO:Foraging:Foraging.py:_InitializeBonsai:line 1409:Trying to connect to already running Bonsai
04:09:30 PM:INFO:Foraging:Foraging.py:_ConnectOSC:line 1456:connecting to GUI and Bonsai through OSC
04:09:31 PM:INFO:Foraging:Foraging.py:_InitializeBonsai:line 1413:Could not connect: timed out
04:09:31 PM:INFO:Foraging:Foraging.py:_InitializeBonsai:line 1422:Starting Bonsai
04:09:31 PM:INFO:Foraging:Foraging.py:log_subprocess_output:line 4911:BONSAI logging starting
04:09:31 PM:INFO:Foraging:Foraging.py:_ConnectOSC:line 1456:connecting to GUI and Bonsai through OSC
04:09:32 PM:INFO:Foraging:Foraging.py:_InitializeBonsai:line 1436:Could not connect, total waiting time 0.5 seconds: timed out
04:09:33 PM:INFO:Foraging:Foraging.py:_ConnectOSC:line 1456:connecting to GUI and Bonsai through OSC
04:09:34 PM:INFO:Foraging:Foraging.py:_InitializeBonsai:line 1436:Could not connect, total waiting time 1.0 seconds: timed out
04:09:34 PM:INFO:Foraging:Foraging.py:_ConnectOSC:line 1456:connecting to GUI and Bonsai through OSC
04:09:35 PM:INFO:Foraging:Foraging.py:_InitializeBonsai:line 1436:Could not connect, total waiting time 1.5 seconds: timed out
04:09:36 PM:INFO:Foraging:Foraging.py:_ConnectOSC:line 1456:connecting to GUI and Bonsai through OSC
04:09:36 PM:INFO:Foraging:Foraging.py:_InitializeBonsai:line 1439:Connected to Bonsai after 2.0 seconds
04:09:36 PM:INFO:Foraging:Foraging.py:_InitializeBonsai:line 1440:Bonsai started successfully
04:09:36 PM:INFO:Foraging:Foraging.py:_ConnectSlims:line 1318:Attempting to connect to Slims
04:09:37 PM:INFO:Foraging:Foraging.py:_ConnectSlims:line 1335:Successfully connected to Slims
04:09:37 PM:WARNING:Dialogs:Dialogs.py:_LoadCalibrationParameters:line 480:could not find water calibration parameters: C:\Users\svc_aind_ephys\Documents\ForagingSettings\WaterCalibrationPar_1.json
04:09:37 PM:INFO:Foraging:Foraging.py:_InitializeMotorStage:line 912:Scanning for newscale stages
04:09:37 PM:INFO:Foraging:Foraging.py:_InitializeMotorStage:line 922:Could not find any instances of NewScale Stage
04:09:37 PM:INFO:Foraging:Foraging.py:_insert_stage_widget:line 279:Inserting Stage Widget
04:09:37 PM:INFO:connection:connection.py:_connect:line 688:Connecting to aibspi(10.128.108.106):2181, use_ssl: False
04:09:37 PM:INFO:client:client.py:_session_callback:line 561:Zookeeper connection established, state: CONNECTED
04:09:37 PM:INFO:connection:connection.py:_connect_attempt:line 655:Closing connection to aibspi:2181
04:09:37 PM:INFO:client:client.py:_session_callback:line 567:Zookeeper session closed, state: CLOSED
04:09:37 PM:INFO:main:main.py:get_stage_widget:line 23:Getting Stage Controller Widget - 1.0.4.dev1+g5cafa8d.b163669
04:09:37 PM:INFO:stepper_motor_device:stepper_motor_device.py:__init__:line 52:Skipping COM3 - device may be being used by another program
04:09:37 PM:INFO:stepper_motor_device:stepper_motor_device.py:__init__:line 70:Connected to COM10, device id: 1130
04:09:37 PM:INFO:stepper_motor_device:stepper_motor_device.py:load_registers:line 151:Getting available registers on device
04:09:37 PM:WARNING:stepper_motor_device:stepper_motor_device.py:load_registers:line 159:Firmware version 0.5 doesn't match config version 0.7.
    Registers may be defined incorrectly
04:09:37 PM:INFO:stage_model:stage_model.py:configure_device:line 81:Configuring registers with default values (can be modified in config file)
04:09:37 PM:INFO:move_worker:move_worker.py:goto_origin:line 195:(move to origin): Moving stage to origin
04:09:37 PM:INFO:move_worker:move_worker.py:move_relative:line 337:(move relative): Moved motors by steps specified in [0, -27200, -27200, 0]
04:09:37 PM:INFO:move_worker:move_worker.py:move_relative:line 337:(move relative): Moved motors by steps specified in [-27200, 0, 0, 0]
04:09:37 PM:INFO:move_worker:move_worker.py:move_relative:line 337:(move relative): Moved motors by steps specified in [0, 0, 0, -27200]
04:09:37 PM:INFO:stage_model:stage_model.py:configure_device:line 87:Zeroed all motor positions
04:09:37 PM:INFO:stage_model:stage_model.py:configure_device:line 88:Finished configuring stepper motor device
#############################################################
04:09:37 PM:INFO:Foraging:Foraging.py:keyPressEvent:line 1901:processing parameter changes
04:09:37 PM:INFO:Foraging:Foraging.py:_load_most_recent_rig_json:line 1572:Found existing rig.json: rig_322_EPHYS4_2024-11-05.json
04:09:37 PM:INFO:Foraging:Foraging.py:__init__:line 243:Start up complete
04:09:39 PM:INFO:aws_util:aws_util.py:import_df_from_s3:line 115:Dataframe imported from s3://aind-behavior-data/foraging_nwb_bonsai_processed/df_sessions.pkl, len(df) = 9519
04:09:39 PM:INFO:aws_util:aws_util.py:import_df_from_s3:line 115:Dataframe imported from s3://aind-behavior-data/foraging_auto_training/df_manager_447_demo.pkl, len(df) = 4659
04:09:40 PM:INFO:aws_util:aws_util.py:download_dir_from_s3:line 140:134 objects downloaded from s3://aind-behavior-data/foraging_auto_training/saved_curriculums/ to C:\Users\svc_aind_ephys/capsule/scratch/saved_curriculums/
04:09:40 PM:INFO:curriculum_manager:curriculum_manager.py:download_curriculums:line 162:Found 26 curriculums in C:\Users\svc_aind_ephys/capsule/scratch/saved_curriculums/
04:09:41 PM:INFO:aws_util:aws_util.py:download_dir_from_s3:line 140:134 objects downloaded from s3://aind-behavior-data/foraging_auto_training/saved_curriculums/ to C:\Users\svc_aind_ephys/.aind_auto_train/curriculum_manager/
04:09:41 PM:INFO:curriculum_manager:curriculum_manager.py:download_curriculums:line 162:Found 26 curriculums in C:\Users\svc_aind_ephys/.aind_auto_train/curriculum_manager/
04:09:41 PM:INFO:Dialogs:Dialogs.py:update_auto_train_fields:line 2292:No entry found in df_training_manager for subject_id: 0
04:09:41 PM:INFO:Dialogs:Dialogs.py:_override_curriculum_clicked:line 2640:Override stage clicked: state=2
04:09:41 PM:INFO:Dialogs:Dialogs.py:_update_stage_to_apply:line 2666:Current stage to apply: unknown training stage @unknown curriculum
04:09:45 PM:INFO:Dialogs:Dialogs.py:_StartCamera:line 1241:Camera is turning on
04:09:45 PM:INFO:Foraging:Foraging.py:_restartlogging:line 1034:Restarting logging
04:09:45 PM:INFO:Foraging:Foraging.py:_GetSaveFolder:line 2775:Created new folder: D:\dynamic-foraging\322_EPHYS4\0\behavior_0_2024-12-19_16-09-45
04:09:45 PM:INFO:Foraging:Foraging.py:_GetSaveFolder:line 2778:Created new folder: D:\dynamic-foraging\322_EPHYS4\0\behavior_0_2024-12-19_16-09-45\metadata-dir
04:09:45 PM:INFO:Foraging:Foraging.py:_GetSaveFolder:line 2781:Created new folder: D:\dynamic-foraging\322_EPHYS4\0\behavior_0_2024-12-19_16-09-45\behavior
04:09:45 PM:INFO:Foraging:Foraging.py:_GetSaveFolder:line 2784:Created new folder: D:\dynamic-foraging\322_EPHYS4\0\behavior_0_2024-12-19_16-09-45\behavior\raw.harp
04:09:45 PM:INFO:Foraging:Foraging.py:_GetSaveFolder:line 2787:Created new folder: D:\dynamic-foraging\322_EPHYS4\0\behavior_0_2024-12-19_16-09-45\behavior-videos
04:09:45 PM:INFO:Foraging:Foraging.py:_GetSaveFolder:line 2790:Created new folder: D:\dynamic-foraging\322_EPHYS4\0\behavior_0_2024-12-19_16-09-45\fib
04:09:45 PM:INFO:rigcontrol:rigcontrol.py:msg_handler:line 56:['/loggerstarted', 'D:\\dynamic-foraging\\322_EPHYS4\\0\\behavior_0_2024-12-19_16-09-45\\behavior\\raw.harp', '127.0.0.1', 4002]
04:09:50 PM:INFO:Dialogs:Dialogs.py:_StartCamera:line 1268:Camera is on!
04:09:51 PM:INFO:Foraging:Foraging.py:log_subprocess_output:line 4917:BONSAI: [out#0/avi @ 000002a18b01ab80] Codec AVOption crf (Select the quality for constant quality mode) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some decoder which was not actually used for any stream.
04:09:54 PM:INFO:Dialogs:Dialogs.py:_StartCamera:line 1272:Camera is turning off
04:09:59 PM:INFO:Dialogs:Dialogs.py:_StartCamera:line 1278:Camera is off!
04:10:01 PM:INFO:Foraging:Foraging.py:_Save:line 2479:Saving current session, ForceSave=True
04:10:02 PM:WARNING:Foraging:Foraging.py:_Save:line 2488:Saving without weight or extra water!
04:10:02 PM:INFO:Foraging:Foraging.py:_GetWaterCalibration:line 1101:Loaded Water Calibration
04:10:02 PM:INFO:Foraging:Foraging.py:_NewSession:line 3585:New Session pressed
04:10:02 PM:INFO:Foraging:Foraging.py:_NewSession:line 3655:New Session complete
04:10:02 PM:INFO:Foraging:Foraging.py:log_subprocess_output:line 4917:BONSAI: 
04:10:02 PM:INFO:Foraging:Foraging.py:log_subprocess_output:line 4917:BONSAI: 
04:10:07 PM:INFO:Foraging:Foraging.py:_check_drop_frames:line 714:Correct: side_camera_left.avi has 1841 frames and 1841 triggers

04:10:07 PM:INFO:GenerateMetadata:GenerateMetadata.py:__init__:line 88:processing:D:\dynamic-foraging\322_EPHYS4\0\behavior_0_2024-12-19_16-09-45
04:10:07 PM:INFO:GenerateMetadata:GenerateMetadata.py:_handle_edge_cases:line 361:No animal response history to log in session metadata
04:10:07 PM:INFO:GenerateMetadata:GenerateMetadata.py:_handle_edge_cases:line 369:Cannot log reward delivery in session metadata - missing fields
04:10:07 PM:INFO:GenerateMetadata:GenerateMetadata.py:_get_reward_delivery:line 1297:No reward delivery metadata found!
04:10:07 PM:INFO:GenerateMetadata:GenerateMetadata.py:_get_behavior_stream:line 1085:No behavior data detected!
04:10:07 PM:INFO:GenerateMetadata:GenerateMetadata.py:_get_ephys_stream:line 969:No ephys data stream detected!
04:10:07 PM:INFO:GenerateMetadata:GenerateMetadata.py:_get_ophys_stream:line 646:No photometry data stream detected!
04:10:07 PM:INFO:GenerateMetadata:GenerateMetadata.py:_get_high_speed_camera_stream:line 624:No camera data stream detected!
04:10:07 PM:INFO:GenerateMetadata:GenerateMetadata.py:_session:line 520:session start time or session end time is empty!
04:10:07 PM:INFO:GenerateMetadata:GenerateMetadata.py:__init__:line 114:Session metadata generated successfully: False
04:10:07 PM:INFO:GenerateMetadata:GenerateMetadata.py:__init__:line 115:Rig metadata generated successfully: True
04:10:07 PM:INFO:GenerateMetadata:GenerateMetadata.py:_get_reward_delivery:line 1297:No reward delivery metadata found!
04:10:07 PM:INFO:GenerateMetadata:GenerateMetadata.py:_get_behavior_stream:line 1085:No behavior data detected!
04:10:07 PM:INFO:GenerateMetadata:GenerateMetadata.py:_get_ephys_stream:line 969:No ephys data stream detected!
04:10:07 PM:INFO:GenerateMetadata:GenerateMetadata.py:_get_ophys_stream:line 646:No photometry data stream detected!
04:10:07 PM:INFO:GenerateMetadata:GenerateMetadata.py:_get_high_speed_camera_stream:line 624:No camera data stream detected!
04:10:07 PM:INFO:GenerateMetadata:GenerateMetadata.py:_session:line 520:session start time or session end time is empty!
04:10:07 PM:WARNING:Foraging:Foraging.py:_Save:line 2707:Meta data is not saved!
04:10:07 PM:ERROR:Foraging:Foraging.py:_Save:line 2708:Error generating session metadata: Window.sessionGenerated[Session].emit(): argument 1 has unexpected type 'NoneType'
04:10:07 PM:ERROR:Foraging:Foraging.py:_Save:line 2709:Traceback (most recent call last):
  File "C:\Users\svc_aind_ephys\Documents\GitHub\dynamic-foraging-task\src\foraging_gui\Foraging.py", line 2691, in _Save
    self.sessionGenerated.emit(session)   # emit sessionGenerated
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: Window.sessionGenerated[Session].emit(): argument 1 has unexpected type 'NoneType'
@alexpiet alexpiet added the low priority - auto-generated autogenerated issues that have only occurred once label Dec 23, 2024
@ellahiltonvano
Copy link

@KanghoonJ

@alexpiet
Copy link
Collaborator Author

@micahwoodard Do you know what is happening here?

@micahwoodard micahwoodard self-assigned this Dec 24, 2024
@micahwoodard
Copy link
Collaborator

Huh it look like the session created is a Nonetype but I don't know why that would be the case. Maybe it has something to do with the metadata not being able to be generated. Can investigate when I get the chance

@KanghoonJ
Copy link
Contributor

@KanghoonJ

This could be due to setting changes in rig 4 on that day. I have fixed the settings. Let me know if the same issue occurs again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
low priority - auto-generated autogenerated issues that have only occurred once
Projects
None yet
Development

No branches or pull requests

4 participants