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

图像识别超时问题 #1244

Open
Ives236 opened this issue Sep 4, 2024 · 0 comments
Open

图像识别超时问题 #1244

Ives236 opened this issue Sep 4, 2024 · 0 comments

Comments

@Ives236
Copy link

Ives236 commented Sep 4, 2024

图像识别超时问题

  • 图像识别-> 在进行图像识别偶尔会识别30分钟或者好几个小时后才抛出异常

描述问题bug
screenshot-20240904-111748

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/airtest/utils/logwraper.py", line 131, in wrapper
    res = f(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/airtest/core/api.py", line 642, in exists
    pos = loop_find(v, timeout=ST.FIND_TIMEOUT_TMP)
  File "/usr/local/lib/python3.9/site-packages/airtest/utils/logwraper.py", line 131, in wrapper
    res = f(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/airtest/core/cv.py", line 62, in loop_find
    screen = G.DEVICE.snapshot(filename=None, quality=ST.SNAPSHOT_QUALITY)
  File "/usr/local/lib/python3.9/site-packages/airtest/core/android/android.py", line 488, in snapshot
    screen = self.screen_proxy.snapshot(ensure_orientation=ensure_orientation)
  File "/usr/local/lib/python3.9/site-packages/airtest/core/android/cap_methods/base_cap.py", line 42, in snapshot
    screen = self.get_frame_from_stream()
  File "/usr/local/lib/python3.9/site-packages/airtest/core/android/cap_methods/javacap.py", line 115, in get_frame_from_stream
    return self.frame_gen.send(None)
  File "/usr/local/lib/python3.9/site-packages/airtest/utils/threadsafe.py", line 27, in send
    return self.it.send(*args)
  File "/usr/local/lib/python3.9/site-packages/airtest/core/android/cap_methods/javacap.py", line 92, in get_frames
    header = s.recv(4)
  File "/usr/local/lib/python3.9/site-packages/airtest/utils/safesocket.py", line 45, in recv
    raise socket.error("socket connection broken")
OSError: socket connection broken

python 版本: python3.9

airtest 版本: airtest 1.3.3

设备:
华为安卓模拟器

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant