Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

Problem with historian.py in Go webapplication #24

Open
Daimonion1980 opened this issue Jun 14, 2015 · 8 comments
Open

Problem with historian.py in Go webapplication #24

Daimonion1980 opened this issue Jun 14, 2015 · 8 comments

Comments

@Daimonion1980
Copy link

After getting the go system to work and compiled all the stuff i got an error after submitting an txt file to the webapp (see screenshot)

Error generating historian plot: fork/exec ./historian.py: %1 ist keine zulässige Win32-Anwendung.

I think there is a path failure to python but if i start historian.py in an command window everything works well.

Also the

unsupported bug report version
unable to find device SDK version

failure are confusing. Did i miss something to install?

Stats are generated via

adb shell dumpsys batterystats > output.txt

Screenshot1

Working on Windows 7 x64

@Daimonion1980
Copy link
Author

Dived deeper into this and found that this line dows not work:

Line269 analyzer.go:
cmd := exec.Command("./historian.py", "-c", "-m", "-r", reportName, filepath)

But everything i tried ("python.exe ./historian.py" instead of using "./historian.py") the line will not generate an pipe to the python file...

I think there is a problem with associated filetypes, but everything i looked into where asssociated with .py as a python.file...

if i type historian.py -a input > output in command window it works like expected...

@Daimonion1980
Copy link
Author

Okay, i submitted a wrong txt file to the tool

after using adb bugreport > output instead of using adb shell dumpsys batterystats > output.txt it works for me.

But under lagecy historian view the problem still exists. See screenshot
unbenannt-1

@guanjianzhe
Copy link

hello, I have the same problem. Have you solved this problem yet?

@guanjianzhe
Copy link

Under lagecy historian view, the same problem exists

@pujiabin
Copy link

Hi, this page solve the problem~
http://ph0b.com/battery-historian-2-0-windows/

@guanjianzhe
Copy link

Hi, this page is useful.Thank you very much!
I have found the same page tow months ago, and built up battery-historian successly.

@Exaper
Copy link

Exaper commented Jan 27, 2016

Make sure to submit bugreport.txt obtained via adb bugreport > bugreport.txt (NOT the legacy batterystats.txt you used to get via adb shell dumpsys batterystats > batterystats.txt)

@guanjianzhe
Copy link

hi,all. I have solved this problem for a long time. I'm so sorry for sharing so late.
please visit this web: http://ph0b.com/battery-historian-2-0-windows/
looking for:
if you want the Battery Historian 1.0 tab to work from Battery Historian 2.0, change line 266 of battery-historian\analyzer\analyzer.go to add first the reference to your Python executable (python.exe is enough if the directory is part of your path):
......

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants