Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

old python graphing script broken #4

Closed
anarcat opened this issue Mar 24, 2016 · 2 comments
Closed

old python graphing script broken #4

anarcat opened this issue Mar 24, 2016 · 2 comments

Comments

@anarcat
Copy link
Contributor

anarcat commented Mar 24, 2016

the python script i wrote is still in the package, but not the default and worse, it's actually broken now:

$ battery-log | ./src/battery-stats-graph
loading CSV file <open file '<stdin>', mode 'r' at 0x7f11f0fe10c0> with builtin CSV module
building data array
guessing expiry
Traceback (most recent call last):
  File "./src/battery-stats-graph", line 190, in <module>
    death = guess_expiry(data[full], data['timestamp'], zero)
  File "./src/battery-stats-graph", line 162, in guess_expiry
    fit = np.polyfit(data[full], data['timestamp'], 1)
  File "/usr/lib/python2.7/dist-packages/numpy/lib/polynomial.py", line 581, in polyfit
    c, resids, rank, s = lstsq(lhs, rhs, rcond)
  File "/usr/lib/python2.7/dist-packages/numpy/linalg/linalg.py", line 1867, in lstsq
    0, work, lwork, iwork, 0)
ValueError: On entry to DLASCL parameter number 4 had an illegal value

my guess is that it wasn't adapted to the new CSV structure, or not correctly. it fails at guessing the death of the battery, above...

@petterreinholdtsen
Copy link
Owner

You are feeding it the wrong log file. The battery-log script output the original log, which lack the information needed by battery-stats-graph. Use the battery-graph with battery-log.

@anarcat
Copy link
Contributor Author

anarcat commented Mar 25, 2016

i think this was fixed in #5.

@anarcat anarcat closed this as completed Mar 25, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants