Skip to content

[Bug]: QWindowsContext: OleInitialize() failed error on running: python -m openadapt.app.visualize #862

Open
@KrishPatel13

Description

@KrishPatel13

Describe the bug

(.venv) PS P:\OpenAdapt> python -m openadapt.app.visualize
2024-07-21 11:25:44.667 | INFO     | openadapt.events:get_events:74 - num_process_iters=0 num_action_events=2600 num_window_events=1 num_screenshots=179
2024-07-21 11:25:44.669 | INFO     | openadapt.events:process_events:825 - before num_action_events=2600 num_window_events=1 num_screenshots=179 num_total=2780
2024-07-21 11:25:44.710 | INFO     | openadapt.events:merge_consecutive_action_events:757 - name='redundant_mouse_move' num_events_removed=66
2024-07-21 11:25:44.733 | INFO     | openadapt.events:get_group_idx_tups:529 - len(to_merge)=10 group_idx_tups=[(0, 8), (8, 10)]
2024-07-21 11:25:44.977 | INFO     | openadapt.events:get_group_idx_tups:529 - len(to_merge)=38 group_idx_tups=[(0, 8), (8, 10), (10, 22), (22, 24), (24, 28), (28, 31), (31, 34), (34, 36), (36, 38)]
2024-07-21 11:25:44.999 | INFO     | openadapt.events:get_group_idx_tups:529 - len(to_merge)=18 group_idx_tups=[(0, 2), (2, 6), (6, 8), (8, 10), (10, 12), (12, 14), (14, 16), (16, 18)]
2024-07-21 11:25:45.048 | INFO     | openadapt.events:merge_consecutive_action_events:757 - name='keyboard' num_events_removed=47
2024-07-21 11:25:45.069 | INFO     | openadapt.events:merge_consecutive_action_events:757 - name='mouse_move' num_events_removed=2415
2024-07-21 11:25:45.069 | INFO     | openadapt.events:merge_consecutive_action_events:757 - name='mouse_scroll' num_events_removed=0
2024-07-21 11:25:45.072 | INFO     | openadapt.events:merge_consecutive_action_events:757 - name='mouse_click' num_events_removed=14
2024-07-21 11:25:45.072 | INFO     | openadapt.events:process_events:873 - after num_action_events_=58 num_window_events_=1 num_screenshots_=52 num_total_=111
2024-07-21 11:25:45.072 | INFO     | openadapt.events:process_events:877 - pct_action_events=0.022307692307692306 pct_window_events=1.0 pct_screenshots=0.2905027932960894 pct_total=0.039928057553956835
2024-07-21 11:25:45.073 | INFO     | openadapt.events:get_events:127 - duration=2.549567461013794
2024-07-21 11:25:45.386 | INFO     | __main__:main:154 - event_dicts=
[{'children': [{'id': 243,
                'mouse_x': 1257,
                'mouse_y': 652,
                'screenshot_id': 11,
                'screenshot_timestamp': 1721569972.3549984,
                'timestamp': 1721569972.3864052},
               {'id': 244,
                'mouse_x': 1254,
                'mouse_y': 652,
                'screenshot_id': 11,
                'screenshot_timestamp': 1721569972.3549984,
                'timestamp': 1721569972.3908093},
               {'id': 245,
                'mouse_x': 1245,
                'mouse_y': 653,
                'screenshot_id': 11,
                'screenshot_timestamp': 1721569972.3549984,
                'timestamp': 1721569972.40064},
               {'id': 246,
                'mouse_x': 1242,
                'mouse_y': 653,
                'screenshot_id': 11,
                'screenshot_timestamp': 1721569972.3549984,
                'timestamp': 1721569972.4023662},
               {'id': 247,
                'mouse_x': 1239,
                'mouse_y': 653,
                'screenshot_id': 11,
                'screenshot_timestamp': 1721569972.3549984,
                'timestamp': 1721569972.4231231},
               {'id': 248,
                'mouse_x': 1232,
                'mouse_y': 653,
                'screenshot_id': 11,
                'screenshot_timestamp': 1721569972.3549984,
                'timestamp': 1721569972.4339736},
               {'id': 249,
                'mouse_x': 1232,
                'mouse_y': 652,
                'screenshot_id': 12,
                'screenshot_timestamp': 1721569975.5022848,
                'timestamp': 1721569975.5144775},
               {'id': 250,
                'mouse_x': 1234,
                'mouse_y': 645,
                'screenshot_id': 12,
                'screenshot_timestamp': 1721569975.5022848,
                'timestamp': 1721569975.5282133},
               {'id': 251,
                'mouse_x': 1272,
                'mouse_y': 583,
                'screenshot_id': 12,
                'screenshot_timestamp': 1721569975.5022848,
                'timestamp': 1721569975.5507956},
               {'id': 252,
                'mouse_x': 1275,
                'mouse_y': 575,
                'screenshot_id': 12,
                'screenshot_timestamp': 1721569975.5022848,
                'timestamp': 1721569975.5543833},
               {'id': 253,
                'mouse_x': 1279,
                'mouse_y': 567,
                'screenshot_id': 12,
                'screenshot_timestamp': 1721569975.5022848,
                'timestamp': 1721569975.5824442},
               {'id': 254,
                'mouse_x': 1291,
                'mouse_y': 559,
                'screenshot_id': 12,
                'screenshot_timestamp': 1721569975.5022848,
                'timestamp': 1721569975.5831692},
               {'children': [{'id': 255,
                              'screenshot_id': 12,
                              'screenshot_timestamp': 1721569975.5022848,
                              'timestamp': 1721569975.586228},
                             {'id': 256,
                              'screenshot_id': 13,
                              'screenshot_timestamp': 1721569995.8832257,
                              'timestamp': 1721569995.9327462}],
                'id': 257,
                'mouse_x': 1290,
                'mouse_y': 559,
                'screenshot_id': 13,
                'screenshot_timestamp': 1721569995.8832257,
                'timestamp': 1721569975.6031942},
               {'id': 258,
                'mouse_x': 1289,
                'mouse_y': 555,
                'screenshot_id': 13,
                'screenshot_timestamp': 1721569995.8832257,
                'timestamp': 1721569975.6038504},
               {'id': 259,
                'mouse_x': 1289,
                'mouse_y': 554,
                'screenshot_id': 13,
                'screenshot_timestamp': 1721569995.8832257,
                'timestamp': 1721569975.6065505},
               {'id': 260,
                'mouse_x': 1289,
                'mouse_y': 552,
                'screenshot_id': 13,
                'screenshot_timestamp': 1721569995.8832257,
                'timestamp': 1721569975.6224337},
               {'id': 261,
                'mouse_x': 1289,
                'mouse_y': 549,
                'screenshot_id': 14,
                'screenshot_timestamp': 1721569995.974621,
                'timestamp': 1721569975.625444},
               {'id': 262,
                'mouse_x': 1289,
                'mouse_y': 550,
                'screenshot_id': 14,
                'screenshot_timestamp': 1721569995.974621,
                'timestamp': 1721569975.6386862},
               {'children': [{'id': 263, 'timestamp': 1721569995.9923966},
                             {'id': 264, 'timestamp': 1721569996.0092666}],
                'id': 265,
                'mouse_x': 1287,
                'mouse_y': 557,
                'screenshot_id': 14,
                'screenshot_timestamp': 1721569995.974621,
                'timestamp': 1721569975.640003},
               {'id': 266,
                'mouse_x': 1286,
                'mouse_y': 558,
                'screenshot_id': 14,
                'screenshot_timestamp': 1721569995.974621,
                'timestamp': 1721569975.6418583},
               {'id': 267,
                'mouse_x': 1284,
                'mouse_y': 561,
                'screenshot_id': 14,
                'screenshot_timestamp': 1721569995.974621,
                'timestamp': 1721569975.6455777},
               {'id': 268,
                'mouse_x': 1281,
                'mouse_y': 565,
                'screenshot_id': 14,
                'screenshot_timestamp': 1721569995.974621,
                'timestamp': 1721569975.6496458},
               {'id': 269,
                'mouse_x': 1278,
                'mouse_y': 568,
                'screenshot_id': 14,
                'screenshot_timestamp': 1721569995.974621,
                'timestamp': 1721569975.6545453},
               {'id': 270,
                'mouse_x': 1274,
                'mouse_y': 576,
                'screenshot_id': 14,
                'screenshot_timestamp': 1721569995.974621,
                'timestamp': 1721569975.657772},
               {'id': 271,
                'mouse_x': 1272,
                'mouse_y': 581,
                'screenshot_id': 14,
                'screenshot_timestamp': 1721569995.974621,
                'timestamp': 1721569975.6616013},
               {'id': 272,
                'mouse_x': 1270,
                'mouse_y': 588,
                'screenshot_id': 14,
                'screenshot_timestamp': 1721569995.974621,
                'timestamp': 1721569975.6656053},
               {'id': 273,
                'mouse_x': 1268,
                'mouse_y': 594,
                'screenshot_id': 14,
                'screenshot_timestamp': 1721569995.974621,
                'timestamp': 1721569975.6695735},
               {'id': 274,
                'mouse_x': 1267,
                'mouse_y': 599,
                'screenshot_id': 14,
                'screenshot_timestamp': 1721569995.974621,
                'timestamp': 1721569975.6741111},
               {'id': 275,
                'mouse_x': 1267,
                'mouse_y': 606,
                'screenshot_id': 14,
                'screenshot_timestamp': 1721569995.974621,
                'timestamp': 1721569975.6818907},
               {'id': 276,
                'mouse_x': 1263,
                'mouse_y': 614,
                'screenshot_id': 14,
                'screenshot_timestamp': 1721569995.974621,
                'timestamp': 1721569975.6998923},
               {'id': 277,
                'mouse_x': 1247,
                'mouse_y': 663,
                'screenshot_id': 14,
                'screenshot_timestamp': 1721569995.974621,
                'timestamp': 1721569975.7018683},
               {'id': 278,
                'mouse_x': 1240,
                'mouse_y': 680,
                'screenshot_id': 14,
                'screenshot_timestamp': 1721569995.974621,
                'timestamp': 1721569975.7030241},
               {'id': 279,
                'mouse_x': 1233,
                'mouse_y': 694,
                'screenshot_id': 14,
                'screenshot_timestamp': 1721569995.974621,
                'timestamp': 1721569975.7056851},
               {'id': 280,
                'mouse_x': 1228,
                'mouse_y': 705,
                'screenshot_id': 14,
                'screenshot_timestamp': 1721569995.974621,
                'timestamp': 1721569975.7095895},
               {'id': 281,
                'mouse_x': 1226,
                'mouse_y': 715,
                'screenshot_id': 14,
                'screenshot_timestamp': 1721569995.974621,
                'timestamp': 1721569975.715115},
               {'id': 282,
                'mouse_x': 1222,
                'mouse_y': 726,
                'screenshot_id': 14,
                'screenshot_timestamp': 1721569995.974621,
                'timestamp': 1721569975.7177162},
               {'id': 283,
                'mouse_x': 1220,
                'mouse_y': 736,
                'screenshot_id': 14,
                'screenshot_timestamp': 1721569995.974621,
                'timestamp': 1721569975.7216306},
               {'id': 284,
                'mouse_x': 1215,
                'mouse_y': 747,
                'screenshot_id': 14,
                'screenshot_timestamp':QWindowsContext: OleInitialize() failed:  "COM error 0x80010106: Cannot change thread mode after it is set."
qt.qpa.window: SetProcessDpiAwarenessContext() failed: The operation completed successfully.
Qt's default DPI awareness context is DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2. If you know what you are doing, you can overwrite this default using qt.conf (https://doc.qt.io/qt-6/highdpi.html#configuring-windows).
2024-07-21 11:25:47.482 | INFO     | __main__:main:258 - len(action_events)=58
Generating Visualization:   0%|                                                                     | 0/58 [00:00<?, ?event/s] 
--- Logging error in Loguru Handler #1 ---
Record was: None
Traceback (most recent call last):
  File "P:\OpenAdapt\.venv\lib\site-packages\loguru\_handler.py", line 272, in _queued_writer
    message = queue.get()
  File "P:\Program Files\Python310\lib\multiprocessing\queues.py", line 367, in get
    return _ForkingPickler.loads(res)
  File "av\\enum.pyx", line 130, in av.enum._unpickle
  File "av\\enum.pyx", line 58, in av.enum.EnumType.__getitem__
KeyError: 'ERRORTYPE_2'
--- End of logging error ---
(.venv) PS P:\OpenAdapt> 

To Reproduce

I use Windows 11 OS.

Step 1: Setup OpenAdapt.
Step 2: Record a small clip with clicking on calculator app and type 10 - 2 = operation. Then, I open chrome. And there as well I typed, 10 - 2. FInally, stop the recording. I wait for the record to finish successfully.
Step 3: Run python -m openadapt.app.visualize.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions