AirtestProject / AirtestProject/Poco

Poco exception: hrpc.exceptions.TransportDisconnected at the end of the script

Open
#447 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
2k
Forks
341
PR merge metrics
No merged PRs in 30d

Description

**Bug**
Every time I'm running my simple script I'm getting an Exception at the end of the script, and the script works fine, but the exception looks strange.

```
Exception ignored in:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/hrpc/object_proxy.py", line 114, in __del__
File "/usr/local/lib/python3.8/dist-packages/hrpc/client.py", line 63, in evaluate
File "/usr/local/lib/python3.8/dist-packages/hrpc/transport/http.py", line 26, in send
hrpc.exceptions.TransportDisconnected: HTTPConnectionPool(host='127.0.0.1', port=17173): Max retries exceeded with url: / (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused'))

```

**Steps To Reproduce**
Steps to reproduce the behaviour:
1. Write simple script with Android device and Reddit mobile app installed
```
import time
from poco.drivers.android.uiautomation import AndroidUiautomationPoco

poco = AndroidUiautomationPoco()

poco.device.unlock()
poco.device.start_app('com.reddit.frontpage')
time.sleep(10)
avatar = poco('com.reddit.frontpage:id/inner_peeking_snoovatar')
avatar.click()
poco.device.snapshot('test.png')
```
2. Run this with Python:
```
python3 test.py
```

**Expected behavior**
The script should be executed without any error messages/exceptions

**python version:** `Python 3.8.5`

**poco version:** `pocoui==1.0.81`

**Smartphone:**
- Device: Xiaomi Readmi 8A
- OS: Android 10 QKQ1.191014.001 , MIUI 12.0.1
- OS on my host: Ubuntu 20.04

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.