{"action":"created","issue":{"url":"https://api.github.com/repos/NetEaseGame/AutomatorX/issues/112","repository_url":"https://api.github.com/repos/NetEaseGame/AutomatorX","labels_url":"https://api.github.com/repos/NetEaseGame/AutomatorX/issues/112/labels{/name}","comments_url":"https://api.github.com/repos/NetEaseGame/AutomatorX/issues/112/comments","events_url":"https://api.github.com/repos/NetEaseGame/AutomatorX/issues/112/events","html_url":"https://github.com/NetEaseGame/AutomatorX/issues/112","id":218136471,"number":112,"title":"win10 64bit下Python3.6下安装ATX出错","user":{"login":"mexth","id":18657844,"avatar_url":"https://avatars1.githubusercontent.com/u/18657844?v=3","gravatar_id":"","url":"https://api.github.com/users/mexth","html_url":"https://github.com/mexth","followers_url":"https://api.github.com/users/mexth/followers","following_url":"https://api.github.com/users/mexth/following{/other_user}","gists_url":"https://api.github.com/users/mexth/gists{/gist_id}","starred_url":"https://api.github.com/users/mexth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mexth/subscriptions","organizations_url":"https://api.github.com/users/mexth/orgs","repos_url":"https://api.github.com/users/mexth/repos","events_url":"https://api.github.com/users/mexth/events{/privacy}","received_events_url":"https://api.github.com/users/mexth/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2017-03-30T09:35:03Z","updated_at":"2017-04-01T02:19:51Z","closed_at":null,"body":"日志如下：\r\nCollecting requests>=2.9.1 (from atx)\r\n  Using cached requests-2.13.0-py2.py3-none-any.whl\r\nCollecting distribute (from atx-androguard==3.0->atx)\r\n  Using cached distribute-0.7.3.zip\r\n    Complete output from command python setup.py egg_info:\r\n    Traceback (most recent call last):\r\n      File \"<string>\", line 1, in <module>\r\n      File \"C:\\Users\\****\\AppData\\Local\\Temp\\pip-build-3eutnrat\\distribute\\setuptools\\__init__.py\", line 2, in <module>\r\n        from setuptools.extension import Extension, Library\r\n      File \"C:\\Users\\****\\AppData\\Local\\Temp\\pip-build-3eutnrat\\distribute\\setuptools\\extension.py\", line 5, in <module>\r\n        from setuptools.dist import _get_unpatched\r\n      File \"C:\\Users\\****\\AppData\\Local\\Temp\\pip-build-3eutnrat\\distribute\\setuptools\\dist.py\", line 7, in <module>\r\n        from setuptools.command.install import install\r\n      File \"C:\\Users\\****\\AppData\\Local\\Temp\\pip-build-3eutnrat\\distribute\\setuptools\\command\\__init__.py\", line 8, in <module>\r\n        from setuptools.command import install_scripts\r\n      File \"C:\\Users\\****\\AppData\\Local\\Temp\\pip-build-3eutnrat\\distribute\\setuptools\\command\\install_scripts.py\", line 3, in <module>\r\n        from pkg_resources import Distribution, PathMetadata, ensure_directory\r\n      File \"C:\\Users\\****\\AppData\\Local\\Temp\\pip-build-3eutnrat\\distribute\\pkg_resources.py\", line 1518, in <module>\r\n        register_loader_type(importlib_bootstrap.SourceFileLoader, DefaultProvider)\r\n    AttributeError: module 'importlib._bootstrap' has no attribute 'SourceFileLoader'\r\n\r\n    ----------------------------------------\r\nCommand \"python setup.py egg_info\" failed with error code 1 in C:\\Users\\****\\AppData\\Local\\Temp\\pip-build-3eutnrat\\distribute\\\r\n\r\n\r\n期待解决，最近的版本我看支持PY3了，就用3.6的版本试了下，发现还是会出错。"},"comment":{"url":"https://api.github.com/repos/NetEaseGame/AutomatorX/issues/comments/290887190","html_url":"https://github.com/NetEaseGame/AutomatorX/issues/112#issuecomment-290887190","issue_url":"https://api.github.com/repos/NetEaseGame/AutomatorX/issues/112","id":290887190,"user":{"login":"mexth","id":18657844,"avatar_url":"https://avatars1.githubusercontent.com/u/18657844?v=3","gravatar_id":"","url":"https://api.github.com/users/mexth","html_url":"https://github.com/mexth","followers_url":"https://api.github.com/users/mexth/followers","following_url":"https://api.github.com/users/mexth/following{/other_user}","gists_url":"https://api.github.com/users/mexth/gists{/gist_id}","starred_url":"https://api.github.com/users/mexth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mexth/subscriptions","organizations_url":"https://api.github.com/users/mexth/orgs","repos_url":"https://api.github.com/users/mexth/repos","events_url":"https://api.github.com/users/mexth/events{/privacy}","received_events_url":"https://api.github.com/users/mexth/received_events","type":"User","site_admin":false},"created_at":"2017-04-01T02:19:51Z","updated_at":"2017-04-01T02:19:51Z","body":"另外使用html report的时候也会出错。\r\n# coding: utf-8\r\nimport atx,time,sys,os\r\nfrom atx.ext.report import Report\r\n\r\nd = atx.connect()\r\nrp = Report(d, save_dir='report')\r\nrp.patch_uiautomator()\r\n。。。测试脚本\r\nif __name__ == '__main__':\r\n    rp.info(\"Test started\", screenshot=d.screenshot())\r\n    测试过程脚本\r\n   rp.close()\r\n\r\n在2.7上是OK的，可以正常执行并生成日志，截图。在3.5.3上执行就会出错，log如下\r\n====================== RESTART: D:\\python\\MXplayer\\1.py ======================\r\n\r\nWarning (from warnings module):\r\n  File \"C:\\Python3\\lib\\site-packages\\uiautomator\\__init__.py\", line 648\r\n    self.server.adb.cmd(\"shell\", \"rm\", device_file).wait()\r\nResourceWarning: unclosed file <_io.BufferedReader name=6>\r\n\r\nWarning (from warnings module):\r\n  File \"C:\\Python3\\lib\\site-packages\\uiautomator\\__init__.py\", line 648\r\n    self.server.adb.cmd(\"shell\", \"rm\", device_file).wait()\r\nResourceWarning: unclosed file <_io.BufferedWriter name=5>\r\n\r\nWarning (from warnings module):\r\n  File \"C:\\Python3\\lib\\site-packages\\atx\\drivers\\android.py\", line 249\r\n    UiaDevice.screenshot(self, tmp_file)\r\nResourceWarning: unclosed file <_io.BufferedReader name=4>\r\n\r\nWarning (from warnings module):\r\n  File \"C:\\Python3\\lib\\site-packages\\atx\\drivers\\android.py\", line 249\r\n    UiaDevice.screenshot(self, tmp_file)\r\nResourceWarning: unclosed file <_io.BufferedWriter name=3>\r\nTraceback (most recent call last):\r\n  File \"D:\\python\\MXplayer\\1.py\", line 70, in <module>\r\n    MX_list()\r\n  File \"D:\\python\\MXplayer\\1.py\", line 30, in MX_list\r\n    d(description=\"更多选项\").click()\r\n  File \"C:\\Python3\\lib\\site-packages\\uiautomator\\__init__.py\", line 108, in __call__\r\n    return self.func(*args, **kwargs)\r\n  File \"C:\\Python3\\lib\\site-packages\\uiautomator\\__init__.py\", line 81, in _inner\r\n    hook_func(dict(name=fn.__name__, self=instance, args=args, kwargs=kwargs, is_before=False, retval=ret))\r\n  File \"C:\\Python3\\lib\\site-packages\\atx\\ext\\report\\__init__.py\", line 83, in _uia_listener\r\n    cv_last_img = imutils.mark_point(cv_last_img, x, y)\r\n  File \"C:\\Python3\\lib\\site-packages\\atx\\imutils.py\", line 150, in mark_point\r\n    cv2.circle(overlay, (x, y), radius, (0, 0, 255), -1)\r\nTypeError: integer argument expected, got float\r\n"}}
{"actor":{"display_login":"mexth"}}