-
Notifications
You must be signed in to change notification settings - Fork 144
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
exit (crash) immediately to shell if -b is passed #15
Comments
Can you paste the output of |
And the content of the whole directory:
|
I have the explanation. I also have the Logitech USB unifying receiver connected to my laptop. |
Glad you figured that out, that's an interesting situation. I just pushed a commit that should make sure gotop doesn't panic anymore with the battery widget by correctly handling an error we were receiving, but I still need to fix the error. So the deal is that we're using distatus/battery to fetch battery information, and it tries to gather information like voltage etc, in addition to current usage. But voltage info isn't provided for your mouse. We don't need that info anyway tho, so I'm thinking we can just fork that project and remove the voltage stuff. |
Great ! |
Looks like there's already an open issue at distatus/battery: distatus/battery#8. |
Hey! The behaviour you're experiencing is, technically, correct. There's a battery(-like) device, but it lacks most of the battery info, hence it is reported, but mostly with errors. To workaround it, you should use granular error checking. I have just pushed an update for it to the CLI part: distatus/battery@c96c646. [BTW: The reason why most errors talk about voltage is because if |
@KenjiTakahashi FYI in case you feel inclined to check the code using your API. I'm not sure exactly how to test this. |
It does looks reasonable to me. Would probably be a bit simpler, if you could check partial errors while iterating over the bottom loop, but I don't know how this could affect whatever |
@KenjiTakahashi Good suggestion, thanks. Since this is all (well, majority) inherited code, there are still areas where I need to better understand the reasoning behind the original logic -- and also the underlying library APIs -- when I'm making code changes, and solutions, like this one, tend to be course-grained. It'll improve over time, we can hope :-) |
Starting gotop -b exits to shell immediately (see error log below).
It seems to try to read files in /sys/class/power_supply/hidpp_battery_0 that do not exist (although that directory exists).
Required information:
gotop version (
gotop -v
):2.0.0
The output of
uname -a
:Linux p72 4.20.2-1-default Add ability to send different signals to processes #1 SMP PREEMPT Sun Jan 13 12:37:46 UTC 2019 (036c5c2) x86_64 x86_64 x86_64 GNU/Linux
Terminal shell (e.g. zsh or bash):
bash
Terminal emulator (e.g. iTerm or gnome terminal):
urxvt
Any relevant hardware info:
Lenovo ThinkPad P72
Also please copy or attach the following file if it exists and contains logs:
Original cjbassi#100
Submitter @bubbleguuum
The text was updated successfully, but these errors were encountered: