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

[Bug]: AssertionError: No action events found. #441

Closed
Mustaballer opened this issue Jul 28, 2023 · 0 comments
Closed

[Bug]: AssertionError: No action events found. #441

Mustaballer opened this issue Jul 28, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@Mustaballer
Copy link
Collaborator

Mustaballer commented Jul 28, 2023

Describe the bug

In #223 when you run
python -m openadapt.share visualize recording_4.db

the output is

  File "/usr/local/Cellar/[email protected]/3.10.11/Frameworks/Python.framework/Versions/3.10/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
         |     -> {'__name__': '__main__', '__doc__': 'Copy a recording from one computer to another.\n\nUsage:\n    python -m openadapt.share ...
         -> <code object <module> at 0x108d04df0, file "/Users/abrichr/oa/OpenAdapt/openadapt/share.py", line 1>

  File "/Users/abrichr/oa/OpenAdapt/openadapt/share.py", line 170, in <module>
    fire.Fire(
    |    -> <function Fire at 0x10ae5d240>
    -> <module 'fire' from '/Users/abrichr/Library/Caches/pypoetry/virtualenvs/openadapt-VBXg4jpm-py3.10/lib/python3.10/site-package...

  File "/Users/abrichr/Library/Caches/pypoetry/virtualenvs/openadapt-VBXg4jpm-py3.10/lib/python3.10/site-packages/fire/core.py", line 141, in Fire
    component_trace = _Fire(component, args, parsed_flag_args, context, name)
                      |     |          |     |                 |        -> 'share.py'
                      |     |          |     |                 -> {}
                      |     |          |     -> Namespace(verbose=False, interactive=False, separator='-', completion=None, help=False, trace=False)
                      |     |          -> ['visualize', 'recording_4.db']
                      |     -> {'send': <function send_recording at 0x155963010>, 'receive': <function receive_recording at 0x1559630a0>, 'visualize': <func...
                      -> <function _Fire at 0x10af5b490>
  File "/Users/abrichr/Library/Caches/pypoetry/virtualenvs/openadapt-VBXg4jpm-py3.10/lib/python3.10/site-packages/fire/core.py", line 466, in _Fire
    component, remaining_args = _CallAndUpdateTrace(
    |                           -> <function _CallAndUpdateTrace at 0x10af5b5b0>
    -> <function visualize_recording at 0x155963130>
  File "/Users/abrichr/Library/Caches/pypoetry/virtualenvs/openadapt-VBXg4jpm-py3.10/lib/python3.10/site-packages/fire/core.py", line 681, in _CallAndUpdateTrace
    component = fn(*varargs, **kwargs)
                |   |          -> {}
                |   -> ['recording_4.db']
                -> <function visualize_recording at 0x155963130>

> File "/Users/abrichr/oa/OpenAdapt/openadapt/share.py", line 163, in visualize_recording
    visualize.main(recording)
    |         |    -> Recording(id=4, timestamp=1689886182.306169, monitor_width=1920, monitor_height=1080, double_click_interval_seconds=0.5, doub...
    |         -> <function main at 0x1558b31c0>
    -> <module 'openadapt.visualize' from '/Users/abrichr/oa/OpenAdapt/openadapt/visualize.py'>

  File "/Users/abrichr/oa/OpenAdapt/openadapt/visualize.py", line 205, in main
    action_events = get_events(recording, process=PROCESS_EVENTS, meta=meta)
                    |          |                  |                    -> {}
                    |          |                  -> True
                    |          -> Recording(id=4, timestamp=1689886182.306169, monitor_width=1920, monitor_height=1080, double_click_interval_seconds=0.5, doub...
                    -> <function get_events at 0x149fdee60>

  File "/Users/abrichr/oa/OpenAdapt/openadapt/events.py", line 48, in get_events
    assert num_action_events > 0, "No action events found."
           -> 0

AssertionError: No action events found.


(openadapt-py3.10) abrichr@MacBook-Pro-3 OpenAdapt % python -m openadapt.share visualize recording_4.db
(openadapt-py3.10) abrichr@MacBook-Pro-3 OpenAdapt % ls -alh data/recordings 
total 7064
-rw-r--r--  1 abrichr  staff   3.4M 25 Jul 16:12 recording_4.db
drwxr-xr-x  4 abrichr  staff   128B 25 Jul 16:11 ..
drwxr-xr-x  3 abrichr  staff    96B 25 Jul 16:12 .

To Reproduce

  1. checkout feat(share): add sharing using magic-wormhole  #223 and run 'poetry install'
  2. Run `python -m openadapt.share send --recording_id=1'
    • ensure you have at least a single recording in your db file
    • this command will output a wormhole code
  3. In a different computer run python -m openadapt.share receive <wormhole_code> (will also need to checkout PR and run poetry install)
    • use wormhole code from step 2
  4. python -m openadapt.share visualize <db_name>
    • db_name should be whatever the name of the db file in data/recordings folder that you want to visualize after receiving the recording in step 3
@Mustaballer Mustaballer added the bug Something isn't working label Jul 28, 2023
R-ohit-B-isht pushed a commit to R-ohit-B-isht/OpenAdapt that referenced this issue Jun 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant