AirtestProject / AirtestProject/Poco

**poco 初始化报错** cannot use a string pattern on a bytes-like object

Đang mở
#430 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Python
Star
2k
Fork
341
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

**描述问题bug**
使用AndroidUiautomationPoco初始化错误。

```
Traceback (most recent call last):
File "/Users/HGI/Program/projects/appCrawl/main.py", line 8, in
poco = AndroidUiautomationPoco(screenshot_each_action=False)
File "/Users/HGI/Program/env3/lib/python3.8/site-packages/poco/drivers/android/uiautomation.py", line 170, in __init__
self.ime.start()
File "/Users/HGI/Program/env3/lib/python3.8/site-packages/airtest/core/android/ime.py", line 77, in start
self.adb.shell("ime enable %s" % self.service_name)
File "/Users/HGI/Program/env3/lib/python3.8/site-packages/airtest/core/android/adb.py", line 361, in shell
out = self.raw_shell(cmd)
File "/Users/HGI/Program/env3/lib/python3.8/site-packages/airtest/core/android/adb.py", line 319, in raw_shell
out = self.cmd(cmds, ensure_unicode=False)
File "/Users/HGI/Program/env3/lib/python3.8/site-packages/airtest/core/android/adb.py", line 177, in cmd
if re.search(DeviceConnectionError.DEVICE_CONNECTION_ERROR, stderr):
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/re.py", line 201, in search
return _compile(pattern, flags).search(string)
TypeError: cannot use a string pattern on a bytes-like object

```

**复现步骤**
我的代码
```
from airtest.core.api import auto_setup
auto_setup(__file__)

from poco.drivers.android.uiautomation import AndroidUiautomationPoco
poco = AndroidUiautomationPoco(screenshot_each_action=False)
```

**python 版本:** `python3.8`

**pocoui 版本:** `1.0.80`

**设备:**
- 型号: google pixel one
- 系统: Android 9

**运行环境**
MacBook Air (13-inch, Early 2014)
处理器 1.4 GHz Intel Core i5
内存 4 GB 1600 MHz DDR3
macOS 10.14.6
PyCharm 2020.3 (Community Edition)

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.