androiddevice.py在py3.7-pycharm中打开报错
Valuebai opened this issue · comments
直接执行cpu.py报错
C:\python37\python.exe D:/codePython/mobileperf/mobileperf/android/cpu.py
path:D:\codePython\mobileperf
[2020-06-12 18:04:44,416]DEBUG:mobileperf:androiddevice:b'List of devices attached\r\nGDB6R19A16004316\tdevice\r\n\r\n'
[2020-06-12 18:04:44,427]DEBUG:mobileperf:androiddevice:system have adb
[2020-06-12 18:04:44,430]DEBUG:mobileperf:cpu:INFO: CpuCollector started...
[2020-06-12 18:04:44,430]DEBUG:mobileperf:cpu:INFO: CpuMonitor has started...
Exception in thread Thread-1:
Traceback (most recent call last):
File "C:\python37\lib\threading.py", line 917, in _bootstrap_inner
self.run()
File "C:\python37\lib\threading.py", line 865, in run
self._target(*self._args, **self._kwargs)
File "D:/codePython/mobileperf/mobileperf/android/cpu.py", line 124, in _collect_cpu_thread
cpu_file = os.path.join(RuntimeData.package_save_path, 'cpuinfo.csv')
File "C:\python37\lib\ntpath.py", line 76, in join
path = os.fspath(path)
TypeError: expected str, bytes or os.PathLike object, not NoneType
具体代码行
# @profile
def _collect_cpu_thread(self,start_time):
end_time = time.time() + self._timeout
cpu_title = ["datetime", "device_cpu_rate%", "user%", "system%"]
cpu_file = os.path.join(RuntimeData.package_save_path, 'cpuinfo.csv') ——这个
cpu采集用的cpu_top.py,cpu.py已删除,RemoteADB,unicode 无用代码已删除