google-research / google-research/android_world

cv2.error: OpenCV(4.11.0) :-1: error: (-5:Bad argument) in function 'rectangle'

Open
#287 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
906
Forks
186
Avg merge
1h 21m
Merged PRs (30d)
1

Description

(android_world) (base) lgy@mechrev:~/code/AppAgent/memgui/reference/android_world$ /home/lgy/miniconda3/envs/android_world/bin/python /home/lgy/code/AppAgent/memgui/reference/android_world/run.py
WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
E0000 00:00:1747554377.689382 396264 trace.cc:89] Unknown tracer: none
Initializing agent...
Starting eval with agent m3a_gpt4v and writing to /home/lgy/android_world/runs/run_20250518T154645549467
Running task: AudioRecorderRecordAudio
======================================
Running task AudioRecorderRecordAudio with goal "Record an audio clip using Audio Recorder app and save it."
W0518 15:46:46.068625 140207728469824 android_world_controller.py:98] Could not get a11y tree, retrying.
----------step 1
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SKIPPING AudioRecorderRecordAudio.
E0518 15:46:47.873249 140207728469824 suite_utils.py:251] Logging exception and skipping task. Will keep running. Task: AudioRecorderRecordAudio: OpenCV(4.11.0) :-1: error: (-5:Bad argument) in function 'rectangle'
> Overload resolution failed:
> - img is not a numpy array, neither a scalar
> - argument for rectangle() given by name ('color') and position (3)
> - Expected Ptr for argument 'img'
> - argument for rectangle() given by name ('color') and position (3)
Traceback (most recent call last):
File "/home/lgy/code/AppAgent/memgui/reference/android_world/android_world/suite_utils.py", line 247, in _run_task
interaction_results = run_episode(task)
^^^^^^^^^^^^^^^^^
File "/home/lgy/code/AppAgent/memgui/reference/android_world/android_world/suite_utils.py", line 456, in run_episode
return episode_runner.run_episode(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/lgy/code/AppAgent/memgui/reference/android_world/android_world/episode_runner.py", line 81, in run_episode
result = agent.step(goal)
^^^^^^^^^^^^^^^^
File "/home/lgy/code/AppAgent/memgui/reference/android_world/android_world/agents/m3a.py", line 397, in step
m3a_utils.add_ui_element_mark(
File "/home/lgy/code/AppAgent/memgui/reference/android_world/android_world/agents/m3a_utils.py", line 189, in add_ui_element_mark
cv2.rectangle(
cv2.error: OpenCV(4.11.0) :-1: error: (-5:Bad argument) in function 'rectangle'
> Overload resolution failed:
> - img is not a numpy array, neither a scalar
> - argument for rectangle() given by name ('color') and position (3)
> - Expected Ptr for argument 'img'
> - argument for rectangle() given by name ('color') and position (3)

Traceback (most recent call last):
File "/home/lgy/code/AppAgent/memgui/reference/android_world/android_world/suite_utils.py", line 247, in _run_task
interaction_results = run_episode(task)
^^^^^^^^^^^^^^^^^
File "/home/lgy/code/AppAgent/memgui/reference/android_world/android_world/suite_utils.py", line 456, in run_episode
return episode_runner.run_episode(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/lgy/code/AppAgent/memgui/reference/android_world/android_world/episode_runner.py", line 81, in run_episode
result = agent.step(goal)
^^^^^^^^^^^^^^^^
File "/home/lgy/code/AppAgent/memgui/reference/android_world/android_world/agents/m3a.py", line 397, in step
m3a_utils.add_ui_element_mark(
File "/home/lgy/code/AppAgent/memgui/reference/android_world/android_world/agents/m3a_utils.py", line 189, in add_ui_element_mark
cv2.rectangle(
cv2.error: OpenCV(4.11.0) :-1: error: (-5:Bad argument) in function 'rectangle'
> Overload resolution failed:
> - img is not a numpy array, neither a scalar
> - argument for rectangle() given by name ('color') and position (3)
> - Expected Ptr for argument 'img'
> - argument for rectangle() given by name ('color') and position (3)

task_num num_complete_trials mean_success_rate mean_episode_length total_runtime_s num_fail_trials
task
AudioRecorderRecordAudio 0 0.0 NaN NaN 2.3 1.0
========= Average ========= 0 0.0 NaN NaN 2.3 1.0

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.