Comments (5)
没遇到啊,什么场景型号和环境?
from py-ios-device.
是这样的, 我开了一个rpc连接,然后一直复用这个连接请求图,然后时间一长就会提示
AttributeError: 'NoneType' object has no attribute 'send'
具体代码如下
def iter_screenshot(rsd: object, udid: object) -> object:
channel = InstrumentsService.Screenshot
rpc = InstrumentServer(rsd, udid).init()
while True:
try:
data = rpc.call(channel, "takeScreenshot").selector
time.sleep(3)
if data:
rpc.stop()
except Exception:
traceback.print_exc()
print("[截图]rpc 连接失败, 将重新连接")
time.sleep(3)
continue
memory_fd = io.BytesIO(data)
im = Image.open(memory_fd)
im.load()
del (memory_fd)
yield im
貌似会断连接,不知道原因。
现在处理是每次开一个新rpc去请求一张截图,然后关掉rpc,这样的处理的。
您知道代码问题所在 或者 为什么会断连接丢失 cli 为 None 吗。
from py-ios-device.
windows 吗 windows 的话图片比较大,好像堵塞然后早成 socket 断开。
from py-ios-device.
问题发生在mac电脑。 windows上次我提过了,您说通道阻塞,我已暂时放弃windows平台截图。
感谢作者, 我已经解决,每次建立新连接,拿到图就断开。
from py-ios-device.
mac 我试了循环 5 分钟没出现你所说问题 ,业务层解决也行出现错误再重启一个实例。
from py-ios-device.
Related Issues (20)
- python 3.10.3 安装 py_ios_device报错 HOT 4
- pyidevice instruments fps does not show fps above 60. HOT 1
- start_get_fps: code == 830472984 HOT 3
- iOS16(A16) GPU Counters error HOT 1
- iOS17设备支持问题 HOT 4
- 大佬,readme手册里的命令执行的参数有问题
- start_get_fps 您好我问一下,为什么我在 iPhone12 系统iOS14.5.1 拿到的FPS和游戏内出入比较大
- Cannot launch app on ios 16 HOT 5
- Get issue when execute command pyidevice crash list --udid HOT 1
- iOS17的屏幕帧数获取在windows上存在延迟。 HOT 2
- iOS 17 Device Not Supporting HOT 3
- requests.exceptions.HTTPError: 404 Client Error: Not Found for url HOT 1
- 通过perfdog 与 tidevice 获取到的游戏应用CPU使用都是10%左右,而通过instruments appmonitor 获取到的cpuUsge 60%
- 截图问题: windows 上的截图太慢 长达10s 请问怎么解决 HOT 2
- ios 17.4.1 无法获取性能数据 ,另一个低版本的ios 17.2.1 一切正常
- socket 连接好像不稳定
- SimulateLocation: InvalidServiceError: No such service: com.apple.dt.simulatelocation HOT 2
- support screencap on ios>17 HOT 2
- fps may not work when time> 600s HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from py-ios-device.