Mobile-Agent-v3 bug: File name too long
I deploy the model with vllm, then running the script run_guiowl.sh, error occurs: E0903 17:06:59.575163 8606189632 suite_utils.py:251] Logging exception and skipping task. Will keep running. Task: ClockTimerEntry: [Errno 63] File name too long: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABEQAAAloCA...
Actually, the bug locates at the code "payload = self.convert_messages_format_to_openaiurl(payload)" in infer_ma3.py and "new_content.append({'type': 'image_url', 'image_url': {'url': image_to_base64(item['image'])}})" in infer_ma3.py. It seems that the func image_to_base64 gets a non-path object, but a long code.
Thank you for your attention. It appears that the image is being base64-encoded twice when passed messages directly. Changing this line: https://github.com/X-PLUG/MobileAgent/blob/main/Mobile-Agent-v3/android_world_v3/android_world/agents/gui_owl.py#L284
to:
user_prompt_part['content'].append({'image': screenshot_file})
I think this should fix the problem. We'll fix this bug.