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

FATAL:TypeError: cannot use a str to initialize an array with typecode 'c' #1253

Open
alexpiet opened this issue Dec 24, 2024 · 0 comments
Open
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: exception_hook
line 4904
logfile: W10DT714669/W10DT714669-B_gui_log_2024-12-23_11-55-42.txt
boxes: 9B
count: 3
text: FATAL:TypeError: cannot use a str to initialize an array with typecode 'c'

GUI Log snippet (click for full log)

11:55:53 AM:INFO:curriculum_manager:curriculum_manager.py:download_curriculums:line 162:Found 26 curriculums in C:\Users\svc_aind_behavior/.aind_auto_train/curriculum_manager/
11:55:53 AM:INFO:Dialogs:Dialogs.py:update_auto_train_fields:line 2292:No entry found in df_training_manager for subject_id: 0
11:55:53 AM:INFO:Dialogs:Dialogs.py:_override_curriculum_clicked:line 2640:Override stage clicked: state=2
11:55:53 AM:INFO:Dialogs:Dialogs.py:_update_stage_to_apply:line 2666:Current stage to apply: unknown training stage @unknown curriculum
11:58:20 AM:ERROR:Foraging:Foraging.py:exception_hook:line 4904:FATAL ERROR: 
Traceback (most recent call last):
  File "C:\Users\svc_aind_behavior\Documents\GitHub\dynamic-foraging-task\src\foraging_gui\Dialogs.py", line 1206, in _start_preview
    self.MainWindow.Channel.CameraStartType(int(2))
  File "C:\Users\svc_aind_behavior\Documents\GitHub\dynamic-foraging-task\src\foraging_gui\rigcontrol.py", line 226, in CameraStartType
    self.send("/camerastarttype", value)
  File "C:\Users\svc_aind_behavior\Documents\GitHub\dynamic-foraging-task\src\foraging_gui\rigcontrol.py", line 60, in send
    return self.client.sendOSC(message)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\svc_aind_behavior\AppData\Local\miniconda3\envs\Foraging\Lib\site-packages\pyOSC3\OSC3.py", line 2869, in sendOSC
    txOk = self._transmitMsgWithTimeout(msg)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\svc_aind_behavior\AppData\Local\miniconda3\envs\Foraging\Lib\site-packages\pyOSC3\OSC3.py", line 2857, in _transmitMsgWithTimeout
    len_big_endian = array.array('c', '\0' * 4)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: cannot use a str to initialize an array with typecode 'c'
Full GUI log
11:55:42 AM:INFO:Foraging:Foraging.py:start_gui_log_file:line 4796:Starting logfile!
11:55:43 AM:INFO:Foraging:Foraging.py:log_git_hash:line 4807:Python version: 3.11.11 | packaged by Anaconda, Inc. | (main, Dec 11 2024, 16:34:19) [MSC v.1929 64 bit (AMD64)]
11:55:43 AM:INFO:Foraging:Foraging.py:log_git_hash:line 4824:Current git commit branch, hash: main, 698fb9fecded812fcf96d570658d9bc3766b14c6
11:55:43 AM:INFO:Foraging:Foraging.py:log_git_hash:line 4828:Current foraging_gui version: 1.6.19
11:55:43 AM:WARNING:Foraging:Foraging.py:log_git_hash:line 4838:local repository is clean
11:55:43 AM:INFO:Foraging:Foraging.py:<module>:line 4944:Setting QApplication attributes
11:55:43 AM:INFO:Foraging:Foraging.py:<module>:line 4952:Starting QApplication and Window
11:55:43 AM:INFO:Foraging:Foraging.py:__init__:line 77:Creating Window
11:55:43 AM:INFO:Foraging:Foraging.py:_GetSettings:line 1211:Loaded settings_box file
11:55:43 AM:INFO:Foraging:Foraging.py:_GetSettings:line 1239:Loaded settings file
11:55:43 AM:WARNING:Foraging:Foraging.py:_GetSettings:line 1249:Missing setting (FIP_settings), using default: C:\Users\svc_aind_behavior\Documents\FIPSettings
11:55:43 AM:WARNING:Foraging:Foraging.py:_GetSettings:line 1249:Missing setting (bonsai_config_path), using default: C:\Users\svc_aind_behavior\Documents\GitHub\dynamic-foraging-task\bonsai\Bonsai.config
11:55:43 AM:WARNING:Foraging:Foraging.py:_GetSettings:line 1249:Missing setting (metadata_dialog_folder), using default: C:\Users\svc_aind_behavior\Documents\ForagingSettings\metadata_dialog\
11:55:43 AM:WARNING:Foraging:Foraging.py:_GetSettings:line 1249:Missing setting (rig_metadata_folder), using default: C:\Users\svc_aind_behavior\Documents\ForagingSettings\rig_metadata\
11:55:43 AM:WARNING:Foraging:Foraging.py:_GetSettings:line 1249:Missing setting (project_info_file), using default: C:\Users\svc_aind_behavior\Documents\ForagingSettings\Project Name and Funding Source v2.csv
11:55:43 AM:WARNING:Foraging:Foraging.py:_GetSettings:line 1249:Missing setting (schedule_path), using default: Z:\dynamic_foraging\DynamicForagingSchedule.csv
11:55:43 AM:WARNING:Foraging:Foraging.py:_GetSettings:line 1249:Missing setting (go_cue_decibel_box1), using default: 60
11:55:43 AM:WARNING:Foraging:Foraging.py:_GetSettings:line 1249:Missing setting (go_cue_decibel_box2), using default: 60
11:55:43 AM:WARNING:Foraging:Foraging.py:_GetSettings:line 1249:Missing setting (go_cue_decibel_box3), using default: 60
11:55:43 AM:WARNING:Foraging:Foraging.py:_GetSettings:line 1249:Missing setting (go_cue_decibel_box4), using default: 60
11:55:43 AM:WARNING:Foraging:Foraging.py:_GetSettings:line 1249:Missing setting (lick_spout_distance_box1), using default: 5000
11:55:43 AM:WARNING:Foraging:Foraging.py:_GetSettings:line 1249:Missing setting (lick_spout_distance_box2), using default: 5000
11:55:43 AM:WARNING:Foraging:Foraging.py:_GetSettings:line 1249:Missing setting (lick_spout_distance_box3), using default: 5000
11:55:43 AM:WARNING:Foraging:Foraging.py:_GetSettings:line 1249:Missing setting (lick_spout_distance_box4), using default: 5000
11:55:43 AM:WARNING:Foraging:Foraging.py:_GetSettings:line 1249:Missing setting (name_mapper_file), using default: C:\Users\svc_aind_behavior\Documents\ForagingSettings\name_mapper.json
11:55:43 AM:WARNING:Foraging:Foraging.py:_GetSettings:line 1249:Missing setting (create_rig_metadata), using default: True
11:55:43 AM:WARNING:Foraging:Foraging.py:_GetSettings:line 1249:Missing setting (save_each_trial), using default: True
11:55:43 AM:WARNING:Foraging:Foraging.py:_GetSettings:line 1249:Missing setting (AutomaticUpload), using default: True
11:55:43 AM:WARNING:Foraging:Foraging.py:_GetSettings:line 1249:Missing setting (manifest_flag_dir), using default: C:\Users\svc_aind_behavior\Documents\aind_watchdog_service\manifest
11:55:43 AM:WARNING:Foraging:Foraging.py:_GetSettings:line 1249:Missing setting (auto_engage), using default: True
11:55:43 AM:WARNING:Foraging:Foraging.py:_GetSettings:line 1249:Missing setting (clear_figure_after_save), using default: True
11:55:43 AM:WARNING:Foraging:Foraging.py:_GetSettings:line 1249:Missing setting (add_default_project_name), using default: True
11:55:43 AM:INFO:Foraging:Foraging.py:_LoadSchedule:line 1137:Loaded behavior schedule
11:55:43 AM:WARNING:Foraging:Foraging.py:_GetWaterCalibration:line 1105:Did not find a recent water calibration file
11:55:43 AM:INFO:Foraging:Foraging.py:_load_most_recent_rig_json:line 1572:Found existing rig.json: rig_428-9-B_2024-12-23_10_58_15.json
11:55:43 AM:INFO:RigJsonBuilder:RigJsonBuilder.py:build_rig_json_core:line 60:building rig json
11:55:43 AM:INFO:RigJsonBuilder:RigJsonBuilder.py:build_rig_json_core:line 624:finished building rig json
11:55:43 AM:INFO:RigJsonBuilder:RigJsonBuilder.py:build_rig_json:line 42:differences with existing rig json: {'type_changes': {"root['stimulus_devices'][0]['stage_type']['serial_number']": {'old_type': <class 'NoneType'>, 'new_type': <class 'str'>, 'old_value': None, 'new_value': '123123'}, "root['stimulus_devices'][0]['stage_type']['manufacturer']['abbreviation']": {'old_type': <class 'str'>, 'new_type': <class 'NoneType'>, 'old_value': 'AIND', 'new_value': None}, "root['stimulus_devices'][0]['stage_type']['manufacturer']['registry']": {'old_type': <class 'dict'>, 'new_type': <class 'NoneType'>, 'old_value': {'name': 'Research Organization Registry', 'abbreviation': 'ROR'}, 'new_value': None}, "root['stimulus_devices'][0]['stage_type']['manufacturer']['registry_identifier']": {'old_type': <class 'str'>, 'new_type': <class 'NoneType'>, 'old_value': '04szwah67', 'new_value': None}, "root['stimulus_devices'][0]['stage_type']['model']": {'old_type': <class 'NoneType'>, 'new_type': <class 'str'>, 'old_value': None, 'new_value': 'XYZ Stage with M30LS-3.4-15 linear stages'}, "root['stimulus_devices'][0]['stage_type']['notes']": {'old_type': <class 'str'>, 'new_type': <class 'NoneType'>, 'old_value': 'https://allenneuraldynamics.github.io/Bonsai.AllenNeuralDynamics/articles/aind-manipulator.html', 'new_value': None}, "root['stimulus_devices'][0]['stage_type']['firmware']": {'old_type': <class 'NoneType'>, 'new_type': <class 'str'>, 'old_value': None, 'new_value': 'https://github.com/AllenNeuralDynamics/python-newscale, branch: axes-on-target, commit #7c17497'}}, 'values_changed': {"root['stimulus_devices'][0]['stage_type']['name']": {'new_value': 'NewScaleMotor for LickSpouts', 'old_value': 'AIND lick spout stage'}, "root['stimulus_devices'][0]['stage_type']['manufacturer']['name']": {'new_value': 'New Scale Technologies', 'old_value': 'Allen Institute for Neural Dynamics'}, "root['stimulus_devices'][0]['stage_type']['travel']": {'new_value': '15.0', 'old_value': '30'}}}
11:55:43 AM:INFO:RigJsonBuilder:RigJsonBuilder.py:build_rig_json:line 51:Saving new rig json: rig_428-9-B_2024-12-23_11_55_43.json
11:55:43 AM:INFO:Foraging:Foraging.py:_LoadUI:line 299:Using ForagingGUI.ui interface
11:55:43 AM:INFO:Foraging:Foraging.py:__init__:line 143:Setting Window title: 428-9-B
11:55:43 AM:INFO:Foraging:Foraging.py:_InitializeBonsai:line 1409:Trying to connect to already running Bonsai
11:55:43 AM:INFO:Foraging:Foraging.py:_ConnectOSC:line 1456:connecting to GUI and Bonsai through OSC
11:55:44 AM:INFO:Foraging:Foraging.py:_InitializeBonsai:line 1413:Could not connect: timed out
11:55:44 AM:INFO:Foraging:Foraging.py:_InitializeBonsai:line 1422:Starting Bonsai
11:55:44 AM:INFO:Foraging:Foraging.py:log_subprocess_output:line 4911:BONSAI logging starting
11:55:45 AM:INFO:Foraging:Foraging.py:_ConnectOSC:line 1456:connecting to GUI and Bonsai through OSC
11:55:46 AM:INFO:Foraging:Foraging.py:_InitializeBonsai:line 1436:Could not connect, total waiting time 0.5 seconds: timed out
11:55:46 AM:INFO:Foraging:Foraging.py:_ConnectOSC:line 1456:connecting to GUI and Bonsai through OSC
11:55:47 AM:INFO:Foraging:Foraging.py:_InitializeBonsai:line 1436:Could not connect, total waiting time 1.0 seconds: timed out
11:55:48 AM:INFO:Foraging:Foraging.py:_ConnectOSC:line 1456:connecting to GUI and Bonsai through OSC
11:55:49 AM:INFO:Foraging:Foraging.py:_InitializeBonsai:line 1436:Could not connect, total waiting time 1.5 seconds: timed out
11:55:49 AM:INFO:Foraging:Foraging.py:_ConnectOSC:line 1456:connecting to GUI and Bonsai through OSC
11:55:50 AM:INFO:Foraging:Foraging.py:_InitializeBonsai:line 1439:Connected to Bonsai after 2.0 seconds
11:55:50 AM:INFO:Foraging:Foraging.py:_InitializeBonsai:line 1440:Bonsai started successfully
11:55:50 AM:INFO:Foraging:Foraging.py:_ConnectSlims:line 1318:Attempting to connect to Slims
11:55:51 AM:INFO:Foraging:Foraging.py:_ConnectSlims:line 1335:Successfully connected to Slims
11:55:51 AM:WARNING:Dialogs:Dialogs.py:_LoadCalibrationParameters:line 480:could not find water calibration parameters: C:\Users\svc_aind_behavior\Documents\ForagingSettings\WaterCalibrationPar_2.json
11:55:51 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)

11:55:51 AM:INFO:Foraging:Foraging.py:_InitializeMotorStage:line 912:Scanning for newscale stages
11:55:51 AM:INFO:Foraging:Foraging.py:_InitializeMotorStage:line 922:Could not find any instances of NewScale Stage
11:55:51 AM:INFO:Foraging:Foraging.py:_GetPositions:line 816:GetPositions called, but no current stage
11:55:51 AM:INFO:Foraging:Foraging.py:_GetPositions:line 816:GetPositions called, but no current stage
11:55:51 AM:INFO:Foraging:Foraging.py:keyPressEvent:line 1901:processing parameter changes
11:55:51 AM:INFO:Foraging:Foraging.py:_StopPhotometry:line 3522:Checking that photometry is not running
11:55:51 AM:INFO:Foraging:Foraging.py:_StopPhotometry:line 3532:Photometry excitation stopped
11:55:51 AM:INFO:Foraging:Foraging.py:_load_most_recent_rig_json:line 1572:Found existing rig.json: rig_428-9-B_2024-12-23_11_55_43.json
11:55:51 AM:INFO:Foraging:Foraging.py:__init__:line 243:Start up complete
11:55:51 AM:INFO:credentials:credentials.py:load:line 621:Found credentials in shared credentials file: ~/.aws/credentials
11:55:52 AM:INFO:aws_util:aws_util.py:import_df_from_s3:line 53:Dataframe imported from s3://aind-behavior-data/foraging_nwb_bonsai_processed/df_sessions.pkl, len(df) = 11636
11:55:52 AM:INFO:aws_util:aws_util.py:import_df_from_s3:line 53:Dataframe imported from s3://aind-behavior-data/foraging_auto_training/df_manager_447_demo.pkl, len(df) = 4708
11:55:53 AM:INFO:aws_util:aws_util.py:download_dir_from_s3:line 78:134 objects downloaded from s3://aind-behavior-data/foraging_auto_training/saved_curriculums/ to C:\Users\svc_aind_behavior/capsule/scratch/saved_curriculums/
11:55:53 AM:INFO:curriculum_manager:curriculum_manager.py:download_curriculums:line 162:Found 26 curriculums in C:\Users\svc_aind_behavior/capsule/scratch/saved_curriculums/
11:55:53 AM:INFO:aws_util:aws_util.py:download_dir_from_s3:line 78:134 objects downloaded from s3://aind-behavior-data/foraging_auto_training/saved_curriculums/ to C:\Users\svc_aind_behavior/.aind_auto_train/curriculum_manager/
11:55:53 AM:INFO:curriculum_manager:curriculum_manager.py:download_curriculums:line 162:Found 26 curriculums in C:\Users\svc_aind_behavior/.aind_auto_train/curriculum_manager/
11:55:53 AM:INFO:Dialogs:Dialogs.py:update_auto_train_fields:line 2292:No entry found in df_training_manager for subject_id: 0
11:55:53 AM:INFO:Dialogs:Dialogs.py:_override_curriculum_clicked:line 2640:Override stage clicked: state=2
11:55:53 AM:INFO:Dialogs:Dialogs.py:_update_stage_to_apply:line 2666:Current stage to apply: unknown training stage @unknown curriculum
11:58:20 AM:ERROR:Foraging:Foraging.py:exception_hook:line 4904:FATAL ERROR: 
Traceback (most recent call last):
  File "C:\Users\svc_aind_behavior\Documents\GitHub\dynamic-foraging-task\src\foraging_gui\Dialogs.py", line 1206, in _start_preview
    self.MainWindow.Channel.CameraStartType(int(2))
  File "C:\Users\svc_aind_behavior\Documents\GitHub\dynamic-foraging-task\src\foraging_gui\rigcontrol.py", line 226, in CameraStartType
    self.send("/camerastarttype", value)
  File "C:\Users\svc_aind_behavior\Documents\GitHub\dynamic-foraging-task\src\foraging_gui\rigcontrol.py", line 60, in send
    return self.client.sendOSC(message)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\svc_aind_behavior\AppData\Local\miniconda3\envs\Foraging\Lib\site-packages\pyOSC3\OSC3.py", line 2869, in sendOSC
    txOk = self._transmitMsgWithTimeout(msg)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\svc_aind_behavior\AppData\Local\miniconda3\envs\Foraging\Lib\site-packages\pyOSC3\OSC3.py", line 2857, in _transmitMsgWithTimeout
    len_big_endian = array.array('c', '\0' * 4)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: cannot use a str to initialize an array with typecode 'c'
@alexpiet alexpiet added the low priority - auto-generated autogenerated issues that have only occurred once label Dec 24, 2024
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

1 participant