本文介绍了systrace:HTML输出的无效跟踪结果格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我跑步时 python systrace.py --time = 10 -o mynewtrace.html gfx
发生以下错误

When I runpython systrace.py --time=10 -o mynewtrace.html gfx
The following error occurs

Starting tracing (10 seconds)
Tracing completed. Collecting output...
<br>
Traceback (most recent call last):
  File "C:\Python27\lib\threading.py", line 801, in __bootstrap_inner
    self.run()<br>
  File "C:\Python27\lib\threading.py", line 754, in run
    self.__target(*self.__args, self.__kwargs)<br>
  File "C:\Users\rajnish.r\AppData\Local\Android\Sdk\platform-tools\systrace\cat
apult\systrace\systrace\tracing_agents\atrace_agent.py", line 194, in _collect_a
nd_preprocess
    self._trace_data = self._preprocess_trace_data(trace_data)<br>
  File "C:\Users\rajnish.r\AppData\Local\Android\Sdk\platform-tools\systrace\cat
apult\systrace\systrace\tracing_agents\atrace_agent.py", line 272, in _preproces
s_trace_data
    trace_data = strip_and_decompress_trace(trace_data)<br>
  File "C:\Users\rajnish.r\AppData\Local\Android\Sdk\platform-tools\systrace\cat
apult\systrace\systrace\tracing_agents\atrace_agent.py", line 332, in strip_and_
decompress_trace
    **trace_data = zlib.decompress(trace_data)**
Outputting Systrace results...<br>
Tracing complete, writing results<br>
Traceback (most recent call last):,br>
  File "systrace.py", line 49, in <module>
    sys.exit(run_systrace.main())<br>
  File "C:\Users\rajnish.r\AppData\Local\Android\Sdk\platform-tools\systrace\cat
apult\systrace\systrace\run_systrace.py", line 196, in main
    main_impl(sys.argv)<br>
  File "C:\Users\rajnish.r\AppData\Local\Android\Sdk\platform-tools\systrace\cat
apult\systrace\systrace\run_systrace.py", line 193, in main_impl
    controller.OutputSystraceResults(write_json=options.write_json)<br>
  File "C:\Users\rajnish.r\AppData\Local\Android\Sdk\platform-tools\systrace\cat
apult\systrace\systrace\systrace_runner.py", line 68, in OutputSystraceResults
    self._out_filename)<br>
  File "C:\Users\rajnish.r\AppData\Local\Android\Sdk\platform-tools\systrace\cat
apult\systrace\systrace\output_generator.py", line 98, in GenerateHTMLOutput
    html_file.write(_ConvertToHtmlString(result.raw_data))<br>
  File "C:\Users\rajnish.r\AppData\Local\Android\Sdk\platform-tools\systrace\cat
apult\systrace\systrace\output_generator.py", line 120, in _ConvertToHtmlString
    raise ValueError('Invalid trace result format for HTML output')<br>
*

*

推荐答案

我只能从Android Device Monitor登录systrace.控制台不适用于我.

I was able to log systrace only from Android Device Monitor. Console didn't work out for me.

这篇关于systrace:HTML输出的无效跟踪结果格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-09 07:32