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

Exits on startup. #39

Closed
Connorabruce opened this Issue Mar 16, 2017 · 4 comments

Comments

2 participants
@Connorabruce

Connorabruce commented Mar 16, 2017

Since adding the PPA and updating to the new version I have been unable to get battery monitor to run on Ubuntu 16.10. It crashes after a few seconds. This is what I get when I run it from the terminal:

`~$ battery-monitor
Press 'ctrl+C' to exit.
Traceback (most recent call last):
File "/usr/share/battery-monitor/battery-monitor.py", line 193, in
notification.show_specific_notifications(monitor)
File "/usr/share/battery-monitor/battery-monitor.py", line 153, in show_specific_notifications
elif percentage == int(self.second_custom_warning):
ValueError: invalid literal for int() with base 10: ''

(process:8551): GLib-CRITICAL **: g_hash_table_destroy: assertion 'hash_table != NULL' failed
Exception ignored in: <bound method Notification.del of <main.Notification object at 0x7f9b6fc8d828>>
Traceback (most recent call last):
File "/usr/share/battery-monitor/battery-monitor.py", line 183, in del
File "", line 969, in _find_and_load
File "", line 954, in _find_and_load_unlocked
File "", line 887, in _find_spec
TypeError: 'NoneType' object is not iterable
`

Thanks.

@maateen

This comment has been minimized.

Show comment
Hide comment
@maateen

maateen Mar 16, 2017

Owner

What have you set as Second Custom Warning?

Owner

maateen commented Mar 16, 2017

What have you set as Second Custom Warning?

@Connorabruce

This comment has been minimized.

Show comment
Hide comment
@Connorabruce

Connorabruce Mar 16, 2017

It is blank. First custom warning is 80%. Low is 18 and critical is 12. Second and third are both empty.

Connorabruce commented Mar 16, 2017

It is blank. First custom warning is 80%. Low is 18 and critical is 12. Second and third are both empty.

@maateen maateen added the bug label Mar 16, 2017

maateen added a commit that referenced this issue Mar 16, 2017

@Connorabruce

This comment has been minimized.

Show comment
Hide comment
@Connorabruce

Connorabruce Mar 16, 2017

Not sure whether this is of any help, but I have been playing around with the program. It seems that whatever percentage is placed in any of the custom warnings will cause it to crash when that percentage is reached and it tries to display a notification.

As a workaround I set all the custom warnings to 101% (so they never trigger) and set the Low and Very Low warnings as normal and everything seems to work fine then. The normal Low Battery warning is displayed when the Low percentage is reached.

Connorabruce commented Mar 16, 2017

Not sure whether this is of any help, but I have been playing around with the program. It seems that whatever percentage is placed in any of the custom warnings will cause it to crash when that percentage is reached and it tries to display a notification.

As a workaround I set all the custom warnings to 101% (so they never trigger) and set the Low and Very Low warnings as normal and everything seems to work fine then. The normal Low Battery warning is displayed when the Low percentage is reached.

@maateen

This comment has been minimized.

Show comment
Hide comment
@maateen

maateen Mar 16, 2017

Owner

I have already fixed the issue in Beta. You can try it from here: https://github.com/maateen/battery-monitor#for-beta-testers

Owner

maateen commented Mar 16, 2017

I have already fixed the issue in Beta. You can try it from here: https://github.com/maateen/battery-monitor#for-beta-testers

@maateen maateen closed this Mar 16, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment