Comments (3)
first of all,if u export it as txt,it might cause this problem, maybe u can try export it as zip and then take the bugreport from it, it works for me,and ihope it will work for u too
from battery-historian.
As other people have reported I also get errors when analyzing Android 10 bugreports.
Note: Could not parse aggregated battery stats.
I then pulled and ran googles latest image 3.1, and it does indeed work with Android 10 bugreports. So after this, I tried extracting all the files from the image and running it myself. These are commands I use (I use Ubuntu):
//Create new container docker create --name="bh" -p 80:80 --expose=80 gcr.io/android-battery-historian/stable:3.1 //Copy all files from container to current local folder docker cp bh:/gopure/src/github.com/google/battery-historian $PWD
I then ran setup.go and then battery-historian.go. The application launched but I still get the same error,
"Could not parse aggregated battery stats."
With the same source I have also tried building my own docker image with the following dockerfile:
#Use latest golang:alpine version which is smaller than regular golang. FROM golang:1.12.5-alpine3.9 #Get the battery historian code from local code commit repo WORKDIR /go/src/codecommit/battery-historian COPY . /go/src/codecommit/battery-historian #Install Java, git and python and cleanup after in the same layer. RUN apk update && \ apk add openjdk8-jre git python2 && \ rm -rf /var/cache/apk/* #Install dependencies recursively and remove the third_party directory after it has been used for compiling. RUN go get ./... && \ go run setup.go #Open default port EXPOSE 80 #Run the start file for battery historian in a container. CMD go run cmd/battery-historian/battery-historian.go --port 80
But when I use this image, I still get the same error as before.
What are I and Google doing differently?
Someone fix it properly ? All recent issues is about it. I have the same problem here, I got docker 3.0 cp from container to local and run then I got the error, but running from docker it work, does not make sense.
from battery-historian.
This is the change in the Google v3.1 docker image that gets rid of that error:
diff --git a/checkinparse/checkin_parse.go b/checkinparse/checkin_parse.go
index d8d6fcb..89fa14f 100644
--- a/checkinparse/checkin_parse.go
+++ b/checkinparse/checkin_parse.go
@@ -589,10 +589,7 @@ func ParseBatteryStats(pc checkinutil.Counter, cr *checkinutil.BatteryReport, pk
// Parse csv lines according to
// frameworks/base/core/java/android/os/BatteryStats.java.
parsed, warn, csErrs := parseSection(pc, reportVersion, rawUID, section, remaining, stats, system, apkSeen, &allAppComputedPowerMah)
- e := false
- if e, warnings, errs = saveWarningsAndErrors(warnings, warn, errs, csErrs...); e {
- return nil, warnings, errs
- }
+ _, warnings, errs = saveWarningsAndErrors(warnings, warn, errs, csErrs...)
if !parsed {
warnings = append(warnings, fmt.Sprintf("unknown data category %s", section))
}
from battery-historian.
Related Issues (20)
- File is too large to parse HOT 5
- Question about item "coulomb charge"
- Bugreport get from Android Q can not parse HOT 3
- The "--" in The README.md is invalid
- Failed to run command "java -jar" closure-compiler HOT 5
- What is 'Video' row, and why is it on 100% of the time HOT 1
- what is long wakelock?
- 1 HOT 1
- Note: Could not parse aggregated battery stats. HOT 3
- strconv.ParseFloat: parsing "p": invalid syntax could not parse aggregated battery stats
- it can be used to ubuntu linux platfrom ?
- won't upload bug report file
- Compilation error HOT 1
- Strange behavior on energy data
- when I execute below command, i get a error as below.Anyone know why? HOT 1
- strconv.ParseInt: parsing "0.0": invalid syntax could not parse aggregated battery stats
- debug google play services possible?
- Photo from Netlink Branding and internet cafe
- Jj
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from battery-historian.