fetchcord / FetchCord

FetchCord grabs your OS info and displays it as Discord Rich Presence
MIT License
324 stars 19 forks source link

Battery Issue on Manjaro Laptop #115

Closed TabulateJarl8 closed 3 years ago

TabulateJarl8 commented 3 years ago

Debug info

----run_rpc----

uptime in epoch: 1606596552.0
cpuid: 740614258177605642
cpuappid: 741100300219187335
termappid: 741286819676553258
hostappid: 743971270395297852
1614 (pacman), 4 (snap) 
----out.py----

----DE/WM----
deid: Plasma
wmid: KWin
wmline item 0: KWin 

----TERMINAL----

fontline: Noto Sans 0 10 [Plasma], Noto Sans, 10 [GTK2/3] 
termid: 741286819676553258
termline item 0: yakuake 
themeline: Breath2 [Plasma], Breath-Dark [GTK2/3] 

----HOST INFO----

hostline: HP Pavilion Laptop 15-cs0xxx 
[KeyError]: 'Battery:'
[KeyError]: 'Battery:'
batteryline: Battery: N/A
resline: 1920x1080 

----GPU INFO----

gpuinfo: Intel UHD Graphics 620
gpuvendor: intel

----CPU INFO----

cpuvendor: intel
cpumodel: Intel i7
cpuinfo: Intel i7-8550U (8) @ 4.000GHz
cpuline item 0: Intel i7-8550U (8) @ 4.000GHz
memline: 3867MiB / 7845MiB 

----OS INFO----

sysosline: Manjaro Linux x86_64 
sysosid: 740614258177605642
diskline: /): 175G / 330G (56%) 
packagesline item 0: 1614 (pacman), 4 (snap) 

----testing.py----
----DE/WM----

deid: Plasma
wmid: KWin

----TERMINAL/SHELL----

termid: 741286819676553258
shellid: bash

----HOST INFO----

hostid: 742887089179197462

----GPU INFO----

gpuvendor: intel

----CPU INFO----

cpumodel: Intel i7

('DEFAULT', <Section: DEFAULT>)
('cycle_0', <Section: cycle_0>)
('cycle_1', <Section: cycle_1>)
('cycle_2', <Section: cycle_2>)
('cycle_3', <Section: cycle_3>)
{}
cycle0 not in : True
try_connect(key="cycle0") on <pypresence.presence.Presence object at 0x7f846ef15580>
cycle 0
try_update(key="cycle0") on <pypresence.presence.Presence object at 0x7f846ef15580>
appid: 740614258177605642
try_clear(key="cycle0") on <pypresence.presence.Presence object at 0x7f846ef15580>
{'cycle0': <pypresence.presence.Presence object at 0x7f846ef15580>}
cycle1 not in : True
try_connect(key="cycle1") on <pypresence.presence.Presence object at 0x7f846fa05220>
cycle 1
try_update(key="cycle1") on <pypresence.presence.Presence object at 0x7f846fa05220>
appid: 741100300219187335
try_clear(key="cycle1") on <pypresence.presence.Presence object at 0x7f846fa05220>
{'cycle0': <pypresence.presence.Presence object at 0x7f846ef15580>, 'cycle1': <pypresence.presence.Presence object at 0x7f846fa05220>}
cycle2 not in : True
try_connect(key="cycle2") on <pypresence.presence.Presence object at 0x7f846f030700>
cycle 2
try_update(key="cycle2") on <pypresence.presence.Presence object at 0x7f846f030700>
appid: 740614258177605642
try_clear(key="cycle2") on <pypresence.presence.Presence object at 0x7f846f030700>
{'cycle0': <pypresence.presence.Presence object at 0x7f846ef15580>, 'cycle1': <pypresence.presence.Presence object at 0x7f846fa05220>, 'cycle2': <pypresence.presence.Presence object at 0x7f846f030700>}
cycle3 not in : True
try_connect(key="cycle3") on <pypresence.presence.Presence object at 0x7f846f0306d0>
[KeyError]: 'Battery:'
cycle 3
[KeyError]: 'Battery:'
try_update(key="cycle3") on <pypresence.presence.Presence object at 0x7f846f0306d0>
appid: 743971270395297852
try_clear(key="cycle3") on <pypresence.presence.Presence object at 0x7f846f0306d0>
{'cycle0': <pypresence.presence.Presence object at 0x7f846ef15580>, 'cycle1': <pypresence.presence.Presence object at 0x7f846fa05220>, 'cycle2': <pypresence.presence.Presence object at 0x7f846f030700>, 'cycle3': <pypresence.presence.Presence object at 0x7f846f0306d0>}
cycle0 not in : False
cycle 0
try_update(key="cycle0") on <pypresence.presence.Presence object at 0x7f846ef15580>
appid: 740614258177605642
^CClosing connection.

If you are unable to run FetchCord please run neofetch --noart(windows) or neofetch -- stdout(macos&linux)

Operating system & way of installation

FetchCord 2.7 on Manjaro installed via pip

Error/issue

There is a KeyError, causing FetchCord to display the battery as N/A because on my laptop NeoFetch displays the battery level under Battery0 instead of what this is trying to get it as, which is just Battery.

Other notes(optional)

Maybe try using a regular expression instead of just statically getting Battery. This one that I just wrote seems to match any battery following the pattern of having or not having a number before the colon, Battery[0-9]*:

BlivionIaG commented 3 years ago

I think i can add that after making 2.7 "stable"

nagaisa-zz commented 3 years ago

i have had the same thing on my manjrao and souls laptops

MrPotatoBobx commented 3 years ago

if it still happens on 2.7, send the debug info

TabulateJarl8 commented 3 years ago
----run_rpc----

uptime in epoch: 1608900196.0
cpuid: 740614258177605642
cpuappid: 741100300219187335
termappid: 741286819676553258
hostappid: 743971270395297852
1701 (pacman), 6 (snap) 
----out.py----

----DE/WM----
deid: Plasma
wmid: KWin
wmline item 0: KWin 

----TERMINAL----

fontline: Noto Sans 0 10 [Plasma], Noto Sans, 10 [GTK2/3] 
termid: 741286819676553258
termline item 0: yakuake 
themeline: Breath2 [Plasma], Breath-Dark [GTK2/3] 

----HOST INFO----

hostline: HP Pavilion Laptop 15-cs0xxx 
[KeyError]: 'Battery:'
[KeyError]: 'Battery:'
batteryline: Battery: N/A
resline: 1920x1080, 1920x1080 

----GPU INFO----

gpuinfo: Intel UHD Graphics 620
gpuvendor: intel

----CPU INFO----

cpuvendor: intel
cpumodel: Intel i7
cpuinfo: Intel i7-8550U (8) @ 4.000GHz
cpuline item 0: Intel i7-8550U (8) @ 4.000GHz
memline: 3496MiB / 7845MiB 

----OS INFO----

sysosline: Manjaro Linux x86_64 
sysosid: 740614258177605642
diskline: /): 320G / 819G (42%) 
packagesline item 0: 1701 (pacman), 6 (snap) 

----testing.py----
----DE/WM----

deid: Plasma
wmid: KWin

----TERMINAL/SHELL----

termid: 741286819676553258
shellid: bash

----HOST INFO----

hostid: 742887089179197462

----GPU INFO----

gpuvendor: intel

----CPU INFO----

cpumodel: Intel i7

('DEFAULT', <Section: DEFAULT>)
('cycle_0', <Section: cycle_0>)
('cycle_1', <Section: cycle_1>)
('cycle_2', <Section: cycle_2>)
('cycle_3', <Section: cycle_3>)
{}
cycle0 not in : True
try_connect(key="cycle0") on <pypresence.presence.Presence object at 0x7f44cdbed580>
cycle 0
try_update(key="cycle0") on <pypresence.presence.Presence object at 0x7f44cdbed580>
appid: 740614258177605642
{'cycle0': <pypresence.presence.Presence object at 0x7f44cdbed580>}
cycle1 not in : True
try_connect(key="cycle1") on <pypresence.presence.Presence object at 0x7f44ce859100>
cycle 1
try_update(key="cycle1") on <pypresence.presence.Presence object at 0x7f44ce859100>
appid: 741100300219187335
{'cycle0': <pypresence.presence.Presence object at 0x7f44cdbed580>, 'cycle1': <pypresence.presence.Presence object at 0x7f44ce859100>}
cycle2 not in : True
try_connect(key="cycle2") on <pypresence.presence.Presence object at 0x7f44cdc8eca0>
cycle 2
try_update(key="cycle2") on <pypresence.presence.Presence object at 0x7f44cdc8eca0>
appid: 740614258177605642
{'cycle0': <pypresence.presence.Presence object at 0x7f44cdbed580>, 'cycle1': <pypresence.presence.Presence object at 0x7f44ce859100>, 'cycle2': <pypresence.presence.Presence object at 0x7f44cdc8eca0>}
cycle3 not in : True
try_connect(key="cycle3") on <pypresence.presence.Presence object at 0x7f44cdc8ed30>
[KeyError]: 'Battery:'
cycle 3
[KeyError]: 'Battery:'
try_update(key="cycle3") on <pypresence.presence.Presence object at 0x7f44cdc8ed30>
appid: 743971270395297852
^CClosing connection.
BlivionIaG commented 3 years ago

@TabulateJarl8 Hello can you try with the new fetchcord version ? pip3 install fetchcord --upgrade or pip install fetchcord --upgrade

TabulateJarl8 commented 3 years ago

Yep, you seemed to have fixed the issue, good job. Closing the issue