Open Source Generative Process Automation (i.e. Generative RPA). AI-First Process Automation with Large ([Language (LLMs) / Action (LAMs) / Multimodal (LMMs)] / Visual Language (VLMs)) Models
I expected the recording to fully playback, but what actually happened is that it only partially played back and then several 'TypeError' expressions appeared in the Terminal logs.
Note that my recording should have encompassed a workflow that extended beyond typing "flights.google.com" into the search bar and pressing "Enter".
(openadapt-py3.10) taylorhorsager@Taylors-MacBook-Air OpenAdapt % python -m openadapt.record "testing out openadapt"
2023-07-04 17:14:04.631 | INFO | openadapt.config:<module>:146 - STOP_STRS=['oa.stop']
2023-07-04 17:14:04.631 | INFO | openadapt.config:<module>:146 - SPECIAL_CHAR_STOP_SEQUENCES=[['ctrl', 'ctrl', 'ctrl']]
2023-07-04 17:14:04.631 | INFO | openadapt.config:<module>:146 - STOP_SEQUENCES=[['o', 'a', '.', 's', 't', 'o', 'p'], ['ctrl', 'ctrl', 'ctrl']]
2023-07-04 17:14:04.631 | INFO | openadapt.config:<module>:146 - CACHE_DIR_PATH=.cache
2023-07-04 17:14:04.632 | INFO | openadapt.config:<module>:146 - CACHE_ENABLED=True
2023-07-04 17:14:04.632 | INFO | openadapt.config:<module>:146 - CACHE_VERBOSITY=0
2023-07-04 17:14:04.632 | INFO | openadapt.config:<module>:146 - DB_ECHO=False
2023-07-04 17:14:04.632 | INFO | openadapt.config:<module>:146 - DB_FNAME=openadapt.db
2023-07-04 17:14:04.632 | INFO | openadapt.config:<module>:146 - OPENAI_API_KEY=<set your api key in .env>
2023-07-04 17:14:04.632 | INFO | openadapt.config:<module>:146 - OPENAI_MODEL_NAME=gpt-3.5-turbo
2023-07-04 17:14:04.632 | INFO | openadapt.config:<module>:146 - RECORD_READ_ACTIVE_ELEMENT_STATE=False
2023-07-04 17:14:04.632 | INFO | openadapt.config:<module>:146 - REPLAY_STRIP_ELEMENT_STATE=True
2023-07-04 17:14:04.632 | INFO | openadapt.config:<module>:146 - IGNORE_WARNINGS=False
2023-07-04 17:14:04.632 | INFO | openadapt.config:<module>:146 - ACTION_TEXT_SEP=-
2023-07-04 17:14:04.632 | INFO | openadapt.config:<module>:146 - ACTION_TEXT_NAME_PREFIX=<
2023-07-04 17:14:04.632 | INFO | openadapt.config:<module>:146 - ACTION_TEXT_NAME_SUFFIX=>
2023-07-04 17:14:04.632 | INFO | openadapt.config:<module>:146 - SCRUB_ENABLED=True
2023-07-04 17:14:04.632 | INFO | openadapt.config:<module>:146 - SCRUB_CHAR=*
2023-07-04 17:14:04.632 | INFO | openadapt.config:<module>:146 - SCRUB_LANGUAGE=en
2023-07-04 17:14:04.632 | INFO | openadapt.config:<module>:146 - SCRUB_FILL_COLOR=255
2023-07-04 17:14:04.632 | INFO | openadapt.config:<module>:146 - SCRUB_CONFIG_TRF={'nlp_engine_name': 'spacy', 'models': [{'lang_code': 'en', 'model_name': 'en_core_web_trf'}]}
2023-07-04 17:14:04.632 | INFO | openadapt.config:<module>:146 - SCRUB_IGNORE_ENTITIES=['DATE_TIME', 'URL']
2023-07-04 17:14:04.632 | INFO | openadapt.config:<module>:146 - SCRUB_KEYS_HTML=['text', 'canonical_text', 'title', 'state', 'task_description', 'key_char', 'canonical_key_char', 'key_vk', 'children']
2023-07-04 17:14:04.632 | INFO | openadapt.config:<module>:146 - PLOT_PERFORMANCE=True
2023-07-04 17:14:04.632 | INFO | openadapt.config:<module>:146 - ROOT_DIRPATH=/Users/taylorhorsager/OpenAdapt
2023-07-04 17:14:04.632 | INFO | openadapt.config:<module>:146 - DB_FPATH=/Users/taylorhorsager/OpenAdapt/openadapt.db
2023-07-04 17:14:04.632 | INFO | openadapt.config:<module>:146 - DB_URL=sqlite:////Users/taylorhorsager/OpenAdapt/openadapt.db
2023-07-04 17:14:04.632 | INFO | openadapt.config:<module>:146 - DIRNAME_PERFORMANCE_PLOTS=performance
2023-07-04 17:14:05.659 | INFO | __main__:wrapper_logging:91 - -> Enter: record(testing out openadapt)
2023-07-04 17:14:05.663 | INFO | __main__:record:657 - task_description='testing out openadapt'
2023-07-04 17:14:05.664 | INFO | __main__:wrapper_logging:91 - -> Enter: create_recording(testing out openadapt)
2023-07-04 17:14:05.710 | INFO | __main__:create_recording:564 - recording=Recording(id=7, timestamp=1688512445.664324, monitor_width=2560, monitor_height=1440, double_click_interval_seconds=0.5, double_click_distance_pixels=5, platform='darwin', task_description='testing out openadapt')
2023-07-04 17:14:05.711 | INFO | __main__:wrapper_logging:95 - <- Leave: create_recording(Recording(id=7, timestamp=1688512445.664324, monitor_width=2560, monitor_height=1440, double_click_interval_seconds=0.5, double_click_distance_pixels=5, platform='darwin', task_description='testing out openadapt'))
2023-07-04 17:14:05.712 | INFO | __main__:wrapper_logging:91 - -> Enter: read_window_events(<queue.Queue object at 0x1463427d0>, <multiprocessing.synchronize.Event object at 0x1463aa4a0>, 1688512445.664324)
2023-07-04 17:14:05.718 | INFO | __main__:read_window_events:432 - starting
2023-07-04 17:14:05.723 | INFO | __main__:read_screen_events:405 - starting
2023-07-04 17:14:05.723 | INFO | __main__:read_screen_events:405 - starting
2023-07-04 17:14:05.738 | INFO | __main__:process_events:135 - starting
2023-07-04 17:14:05.982 | INFO | __main__:read_window_events:451 - _window_data={'title': 'Terminal OpenAdapt — poetry shell ▸ Python — 80×77', 'left': 163, 'top': 79, 'width': 585, 'height': 1113, 'window_id': 65996}
2023-07-04 17:14:07.972 | INFO | __mp_main__:wrapper_logging:91 - -> Enter: write_events(window, <function write_window_event at 0x15e27b490>, <multiprocessing.queues.Queue object at 0x10310a4d0>, <multiprocessing.queues.Queue object at 0x15e262e30>, 1688512445.664324, <multiprocessing.synchronize.Event object at 0x15e263160>)
2023-07-04 17:14:07.977 | INFO | __mp_main__:write_events:276 - event_type='window' starting
2023-07-04 17:14:07.997 | INFO | __mp_main__:wrapper_logging:91 - -> Enter: performance_stats_writer(<multiprocessing.queues.Queue object at 0x1035024d0>, 1688512445.664324, <multiprocessing.synchronize.Event object at 0x15de3ae30>)
2023-07-04 17:14:08.000 | INFO | __mp_main__:wrapper_logging:91 - -> Enter: write_events(screen, <function write_screen_event at 0x167c07400>, <multiprocessing.queues.Queue object at 0x104cc64d0>, <multiprocessing.queues.Queue object at 0x167beee30>, 1688512445.664324, <multiprocessing.synchronize.Event object at 0x167bef160>)
2023-07-04 17:14:08.003 | INFO | __mp_main__:performance_stats_writer:482 - performance stats writer starting
2023-07-04 17:14:08.006 | INFO | __mp_main__:write_events:276 - event_type='screen' starting
2023-07-04 17:14:08.022 | INFO | __mp_main__:memory_writer:504 - Memory writer starting
2023-07-04 17:14:08.034 | INFO | __mp_main__:wrapper_logging:91 - -> Enter: write_events(action, <function write_action_event at 0x163927250>, <multiprocessing.queues.Queue object at 0x1009864d0>, <multiprocessing.queues.Queue object at 0x16390ee30>, 1688512445.664324, <multiprocessing.synchronize.Event object at 0x16390f160>)
2023-07-04 17:14:08.039 | INFO | __mp_main__:write_events:276 - event_type='action' starting
2023-07-04 17:14:24.747 | WARNING | openadapt.window._macos:get_active_window_state:42 - exc=TypeError('Cannot pickle Objective-C objects')
2023-07-04 17:14:24.748 | INFO | __main__:read_window_events:451 - _window_data={'title': 'Google Chrome New Tab', 'left': 937, 'top': 194, 'width': 1351, 'height': 794, 'window_id': 65998}
2023-07-04 17:14:26.715 | WARNING | openadapt.window._macos:get_active_window_state:42 - exc=TypeError('Cannot pickle Objective-C objects')
2023-07-04 17:14:29.868 | WARNING | openadapt.window._macos:get_active_window_state:42 - exc=TypeError('Cannot pickle Objective-C objects')
2023-07-04 17:14:33.127 | WARNING | openadapt.window._macos:get_active_window_state:42 - exc=TypeError('Cannot pickle Objective-C objects')
2023-07-04 17:14:33.130 | INFO | __main__:read_window_events:451 - _window_data={'title': 'Google Chrome', 'left': 1055, 'top': 221, 'width': 1115, 'height': 408, 'window_id': 66001}
2023-07-04 17:14:36.521 | WARNING | openadapt.window:get_active_window_state:43 - exc=TypeError("'NoneType' object is not callable")
2023-07-04 17:14:38.834 | WARNING | openadapt.window._macos:get_active_window_state:42 - exc=TypeError('Cannot pickle Objective-C objects')
2023-07-04 17:14:38.836 | INFO | __main__:read_window_events:451 - _window_data={'title': 'Google Chrome Google Flights - Find Cheap Flight Options & Track Prices', 'left': 937, 'top': 194, 'width': 1351, 'height': 794, 'window_id': 65998}
2023-07-04 17:14:41.050 | WARNING | openadapt.window._macos:get_active_window_state:42 - exc=TypeError('Cannot pickle Objective-C objects')
2023-07-04 17:14:43.415 | WARNING | openadapt.window._macos:get_active_window_state:42 - exc=TypeError('Cannot pickle Objective-C objects')
2023-07-04 17:14:45.669 | WARNING | openadapt.window._macos:get_active_window_state:42 - exc=TypeError('Cannot pickle Objective-C objects')
2023-07-04 17:14:48.023 | WARNING | openadapt.window._macos:get_active_window_state:42 - exc=TypeError('Cannot pickle Objective-C objects')
2023-07-04 17:14:50.377 | WARNING | openadapt.window._macos:get_active_window_state:42 - exc=TypeError('Cannot pickle Objective-C objects')
2023-07-04 17:14:50.379 | INFO | __main__:read_window_events:451 - _window_data={'title': 'Google Chrome Salt Lake City to Minneapolis | Google Flights', 'left': 937, 'top': 194, 'width': 1351, 'height': 794, 'window_id': 65998}
2023-07-04 17:14:52.802 | WARNING | openadapt.window._macos:get_active_window_state:42 - exc=TypeError('Cannot pickle Objective-C objects')
2023-07-04 17:14:55.086 | WARNING | openadapt.window._macos:get_active_window_state:42 - exc=TypeError('Cannot pickle Objective-C objects')
2023-07-04 17:14:57.610 | WARNING | openadapt.window._macos:get_active_window_state:42 - exc=TypeError('Cannot pickle Objective-C objects')
2023-07-04 17:14:59.919 | WARNING | openadapt.window._macos:get_active_window_state:42 - exc=TypeError('Cannot pickle Objective-C objects')
2023-07-04 17:15:02.108 | WARNING | openadapt.window._macos:get_active_window_state:42 - exc=TypeError('Cannot pickle Objective-C objects')
2023-07-04 17:15:04.450 | WARNING | openadapt.window._macos:get_active_window_state:42 - exc=TypeError('Cannot pickle Objective-C objects')
2023-07-04 17:15:04.452 | INFO | __main__:read_window_events:451 - _window_data={'title': 'Google Chrome Minneapolis to Salt Lake City | Google Flights', 'left': 937, 'top': 194, 'width': 1351, 'height': 794, 'window_id': 65998}
2023-07-04 17:15:06.666 | WARNING | openadapt.window._macos:get_active_window_state:42 - exc=TypeError('Cannot pickle Objective-C objects')
2023-07-04 17:15:06.667 | INFO | __main__:read_window_events:451 - _window_data={'title': 'Google Chrome Round trip to Minneapolis | Google Flights', 'left': 937, 'top': 194, 'width': 1351, 'height': 794, 'window_id': 65998}
^C2023-07-04 17:15:07.533 | INFO | __mp_main__:write_events:286 - event_type='action' done
2023-07-04 17:15:07.534 | INFO | __mp_main__:wrapper_logging:95 - <- Leave: write_events(None)
2023-07-04 17:15:07.533 | INFO | __mp_main__:write_events:286 - event_type='window' done
2023-07-04 17:15:07.534 | INFO | __mp_main__:wrapper_logging:95 - <- Leave: write_events(None)
2023-07-04 17:15:07.734 | INFO | __main__:process_events:190 - done
2023-07-04 17:15:07.734 | INFO | __main__:wrapper_logging:95 - <- Leave: process_events(None)
2023-07-04 17:15:07.735 | INFO | __main__:read_screen_events:412 - done
2023-07-04 17:15:08.147 | INFO | __main__:log_memory_usage:65 - source='File "/Users/taylorhorsager/Library/Caches/pypoetry/virtualenvs/openadapt-IciE2gK5-py3.10/lib/python3.10/site-packages/mss/darwin.py", line 226'
2023-07-04 17:15:08.148 | INFO | __main__:log_memory_usage:66 - new_KiB=11289610.91015625 total_KiB=11289610.91015625 new_blocks=392 total_blocks=392
2023-07-04 17:15:08.149 | INFO | __main__:log_memory_usage:65 - source='File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/multiprocessing/reduction.py", line 51'
2023-07-04 17:15:08.149 | INFO | __main__:log_memory_usage:66 - new_KiB=64802.060546875 total_KiB=64802.6240234375 new_blocks=5 total_blocks=16
2023-07-04 17:15:08.150 | INFO | __main__:log_memory_usage:65 - source='File "/Users/taylorhorsager/Library/Caches/pypoetry/virtualenvs/openadapt-IciE2gK5-py3.10/lib/python3.10/site-packages/atomacos/_converter.py", line 32'
2023-07-04 17:15:08.151 | INFO | __main__:log_memory_usage:66 - new_KiB=5833.7001953125 total_KiB=5833.7001953125 new_blocks=21307 total_blocks=21307
2023-07-04 17:15:17.168 | INFO | __main__:log_memory_usage:69 - trace_str=
types | # objects | total size
=========================================== | =========== | ============
bytearray | 197 | 10.82 GB
_io.BytesIO | 3 | 63.28 MB
tuple | 314180 | 21.51 MB
str | 34321 | 8.94 MB
list | 21078 | 4.45 MB
objc.pyobjc_unicode | 43558 | 3.84 MB
dict | 10617 | 3.23 MB
<objective-c class NSTaggedPointerString> | 19695 | 1.05 MB
<objective-c class __NSCFString> | 19266 | 1.03 MB
float | 41849 | 980.84 KB
<objective-c class __NSCFConstantString> | 8287 | 453.20 KB
atomacos._converter.CGRect | 5718 | 402.05 KB
atomacos._converter.CGPoint | 5156 | 281.97 KB
int | 8838 | 242.36 KB
atomacos._converter.CGSize | 4227 | 231.16 KB
2023-07-04 17:15:17.169 | INFO | __main__:record:782 - joining...
2023-07-04 17:15:17.627 | WARNING | openadapt.window._macos:get_active_window_state:42 - exc=TypeError('Cannot pickle Objective-C objects')
2023-07-04 17:15:17.628 | INFO | __main__:wrapper_logging:95 - <- Leave: read_window_events(None)
2023-07-04 17:17:52.388 | INFO | __mp_main__:write_events:286 - event_type='screen' done
2023-07-04 17:17:52.390 | INFO | __mp_main__:wrapper_logging:95 - <- Leave: write_events(None)
2023-07-04 17:17:52.502 | INFO | __mp_main__:performance_stats_writer:496 - performance stats writer done
2023-07-04 17:17:52.503 | INFO | __mp_main__:wrapper_logging:95 - <- Leave: performance_stats_writer(None)
2023-07-04 17:17:52.506 | INFO | __mp_main__:memory_writer:531 - Memory writer done
Deallocating objective-C class __NSCFConstantString2023-07-04 17:17:53.861 | INFO | openadapt.utils:plot_performance:494 - fpath='performance/performance-1688512445.664324.png'
2023-07-04 17:17:54.381 | INFO | __main__:record:798 - saved recording_timestamp=1688512445.664324
2023-07-04 17:17:54.383 | INFO | __main__:wrapper_logging:95 - <- Leave: record(None)
/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/multiprocessing/resource_tracker.py:224: UserWarning: resource_tracker: There appear to be 40 leaked semaphore objects to clean up at shutdown
warnings.warn('resource_tracker: There appear to be %d '
To Reproduce
I use macOS Ventura 13.1, Apple M1, 8 GB memory. The recording was created in a new/empty shell. Steps to reproduce:
Open Terminal and input 'cd OpenAdapt' followed by 'poetry shell' followed by 'python -m openadapt.record "testing out openadapt"'
Click on the search bar in Google Chrome (which should already be open on the desktop) and type 'flights.google.com' followed by 'Enter'
Click on the destination for the flight and type 'MSP'
Click the 'Search' button
Click on the 'Airlines' dropdown
Scroll down with the mouse wheel until you can see 'Delta' and select the 'Only' button (note that this button appears when the cursor is hovering over the right side of the row)
Click the 'X' to close the dropdown
Select the first departure flight that is displayed
Select the first return flight that is displayed
Select the Terminal and input 'CTRL+C' to stop the recording
After the recording has finished processing, input 'python -m openadapt.replay NaiveReplayStrategy'
BUG - the replay only displays part of the recording and the Terminal displays 'TypeError' codes
Describe the bug
I expected the recording to fully playback, but what actually happened is that it only partially played back and then several 'TypeError' expressions appeared in the Terminal logs.
Note that my recording should have encompassed a workflow that extended beyond typing "flights.google.com" into the search bar and pressing "Enter".
Screen recording of the replay: https://github.com/OpenAdaptAI/OpenAdapt/assets/84868895/077443b3-447b-4d87-911c-ed8b687c7a31
Note that the logs below have been truncated to fit in the description for this issue...
Here are the logs from when I tried to replay the recording:
Here are the logs from making the recording:
To Reproduce
I use macOS Ventura 13.1, Apple M1, 8 GB memory. The recording was created in a new/empty shell. Steps to reproduce: