-
Notifications
You must be signed in to change notification settings - Fork 224
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
找不到Screenshot目录下的screenshot.jpg文件。 #22
Comments
你好。没有找到截图是因为你的ADB截屏没有执行成功。请确保你的手机在开发者选项中打开“USB调试”,并且USB选项选择为“传输文件”,随后在命令行中输入“adb_path devices”来检查你的设备是否在可调试列表中。在运行之前,请确保ADB的功能是正常的。 |
谢谢您,我解决了我的问题。我将所有的adb_path 切换成了adb(我以前配置过环境变量),解决了这个问题。另外项目执行的很慢,这正常吗?3分种大概执行了5次操作。 |
十分抱歉,由于操作的pipeline较长,目前速度很难达到实时操作
|
2024-06-07 11:28:54,386 - modelscope - INFO - loading model done
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ D:\github-app\MobileAgent\Mobile-Agent-v2\run.py:286 in │
│ │
│ 283 │ iter += 1 │
│ 284 │ if iter == 1: │
│ 285 │ │ screenshot_file = "./screenshot/screenshot.jpg" │
│ ❱ 286 │ │ perception_infos, width, height = get_perception_infos(adb_path, screenshot_file │
│ 287 │ │ shutil.rmtree(temp_file) │
│ 288 │ │ os.mkdir(temp_file) │
│ 289 │
│ │
│ D:\github-app\MobileAgent\Mobile-Agent-v2\run.py:175 in get_perception_infos │
│ │
│ 172 │
│ 173 │
│ 174 def get_perception_infos(adb_path, screenshot_file): │
│ ❱ 175 │ get_screenshot(adb_path) │
│ 176 │ │
│ 177 │ width, height = Image.open(screenshot_file).size │
│ 178 │
│ │
│ D:\github-app\MobileAgent\Mobile-Agent-v2\MobileAgent\controller.py:49 in get_screenshot │
│ │
│ 46 │ subprocess.run(command, capture_output=True, text=True, shell=True) │
│ 47 │ image_path = "./screenshot/screenshot.png" │
│ 48 │ save_path = "./screenshot/screenshot.jpg" │
│ ❱ 49 │ image = Image.open(image_path) │
│ 50 │ image.convert("RGB").save(save_path, "JPEG") │
│ 51 │ os.remove(image_path) │
│ 52 │
│ │
│ C:\Users\lxc\AppData\Local\Programs\Python\Python310\lib\site-packages\PIL\Image.py:3277 in open │
│ │
│ 3274 │ │ filename = os.path.realpath(os.fspath(fp)) │
│ 3275 │ │
│ 3276 │ if filename: │
│ ❱ 3277 │ │ fp = builtins.open(filename, "rb") │
│ 3278 │ │ exclusive_fp = True │
│ 3279 │ │
│ 3280 │ try: │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
FileNotFoundError: [Errno 2] No such file or directory:
'D:\github-app\MobileAgent\Mobile-Agent-v2\screenshot\screenshot.png'
我看了下代码,确实有去找这个文件的这个行为。但是我不确定这个行为是什么意思?我猜测是在gpt-4o工作之前需要拿到手机屏幕的一张图片,然后项目才能执行下去,是这样吗?
The text was updated successfully, but these errors were encountered: