新手区 ATX IDE 启动成功了,设备也读到了,但连接失败

xrandy · 2017年12月14日 · 最后由 xrandy 回复于 2017年12月14日 · 2662 次阅读

请问是什么原因

android device list: [u'3f34e213']
ERROR:tornado.application:Uncaught exception POST /device (127.0.0.1)
HTTPServerRequest(protocol='http', host='127.0.0.1:10010', method='POST', uri='/device', version='HTTP/1.1', remote_ip='127.0.0.1', headers={'Origin': 'http://127.0.0.1:10010', 'Content-Length': '15', 'Accept-Language': 'zh-CN,zh;q=0.8', 'Accept-Encoding': 'gzip, deflate, br', 'Host': '127.0.0.1:10010', 'Accept': 'application/json, text/javascript, /; q=0.01', 'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36', 'Connection': 'keep-alive', 'X-Requested-With': 'XMLHttpRequest', 'Referer': 'http://127.0.0.1:10010/', 'Cookie': 'guid=96992031.3752038610054687000.1504003074348.3323; monitor_count=2', 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'})
Traceback (most recent call last):
File "C:\Python27\lib\site-packages\tornado\web.py", line 1509, in _execute
result = method(self.path_args, **self.path_kwargs)
File "C:\Python27\lib\site-packages\atxweb\server.py", line 343, in post
device = atx.connect(
*settings)
File "C:\Python27\lib\site-packages\atx__init
.py", line 77, in connect
c = cls(connect_url, **kwargs)
TypeError: init() got multiple values for keyword argument 'serialno'
ERROR:tornado.access:500 POST /device (127.0.0.1) 6.00ms

共收到 5 条回复 时间 点赞
xrandy 回复

atx-webide 因为人力匮乏,重构难度高,已经不维护了

codeskyblue 回复

谢谢哈,那就只能不用了咯

codeskyblue 回复

请问 d.click_image 用到的图片是要先截图保存么,存放路径有没有什么要求。
才了解 ATX,没查到详细的资料,大部分都省略了很多细节,不太清楚。

codeskyblue 回复

复制的社区里的代码更改了下,启动起来了,但后面报错,不知道哪里错误了,代码如下
d = atx.connect()
print d.start_app('xxxx',"xxxxy")
time.sleep(15)

rp = Report(d, save_dir=u'report')
rp.patch_uiautomator()
rp.info("Test started", screenshot=d.screenshot())

d.click_image(r"F:/Test_game_data/screenshots/进入游戏.1920x1080.png")

python 报错

2017-12-14 21:28:39.438 WARN [atx.drivers.mixin: 390] warning, screenshot failed [2/1], retry again
Traceback (most recent call last):
File "E:/Testscript/apppium/test/test_game.py", line 15, in
rp.info("Test started", screenshot=d.screenshot())
File "D:\Program Files\Python27\lib\site-packages\atx\drivers\mixin.py", line 62, in _inner
_retval = fn(*args, **kwargs)
File "D:\Program Files\Python27\lib\site-packages\atx\drivers\mixin.py", line 391, in screenshot
screen = self._take_screenshot()
File "D:\Program Files\Python27\lib\site-packages\atx\drivers\android.py", line 279, in _take_screenshot
screen = self._screenshot_minicap()
File "D:\Program Files\Python27\lib\site-packages\atx\drivers\android.py", line 231, in _screenshot_minicap
self._minicap_params(), phone_tmp_file)
File "D:\Program Files\Python27\lib\site-packages\atx\drivers\android.py", line 215, in _minicap_params
rotation = self.rotation
File "D:\Program Files\Python27\lib\site-packages\atx\drivers\android.py", line 202, in rotation
return self.adb_device.rotation() or self.info['displayRotation']
File "D:\Program Files\Python27\lib\site-packages\atx\adbkit\device.py", line 130, in rotation
return self.display.rotation
AttributeError: 'NoneType' object has no attribute 'rotation'

需要 登录 后方可回复, 如果你还没有账号请点击这里 注册