fetchcord / FetchCord

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

Cannot read property 'application_id' of undefined #112

Closed TabulateJarl8 closed 3 years ago

TabulateJarl8 commented 3 years ago

Debug info

----out.py----

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

----TERMINAL----

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

----HOST INFO----

hostline: Host: HP Pavilion Laptop 15-cs0xxx 
batteryline: Battery0: 100% [Full] 
resline: Resolution: 1920x1080, 1920x1080 

----GPU INFO----

gpuinfo: GPU: N/A
gpuvendor: Intel

----CPU INFO----

cpuvendor: Intel
cpumodel: Intel i7
cpuinfo: CPU: Intel i7-8550U  @ 4.000GHz 
cpuline item 0: ['CPU: Intel i7-8550U (8) @ 4.000GHz ']
memline: Memory: 3330MiB / 7845MiB 

----OS INFO----

sysosline: OS: Manjaro Linux x86_64 
sysosid: Manjaro
diskline: Disk (/): 174G / 330G (56%) 
packagesline item 0: Packages: 1614 (pacman), 4 (snap) 

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

deid: Plasma
wmid: KWin

----TERMINAL/SHELL----

termid: yakuake
shellid: bash

----HOST INFO----

hostid: HP

----GPU INFO----

gpuvendor: Intel

----CPU INFO----

cpumodel: Intel i7

Connecting
----run_rpc----

uptime in epoch: 1606229434.0
cpuid: 740614258177605642
cpuappid: 741100300219187335
termappid: 741286819676553258
hostappid: 743971270395297852
Packages: 1614 (pacman), 4 (snap) 
('DEFAULT', <Section: DEFAULT>)
('cycle_0', <Section: cycle_0>)
('cycle_1', <Section: cycle_1>)
('cycle_2', <Section: cycle_2>)
('cycle_3', <Section: cycle_3>)
RPC Connection Successful.
cycle 0
appid: 740614258177605642
Traceback (most recent call last):
  File "/home/tabulate/.local/bin/fetchcord", line 8, in <module>
    sys.exit(main())
  File "/home/tabulate/.local/lib/python3.8/site-packages/fetch_cord/run_rpc.py", line 39, in main
    loonix(config, loop, gpuinfo, memline, cpuinfo,
  File "/home/tabulate/.local/lib/python3.8/site-packages/fetch_cord/run_rpc.py", line 424, in loonix
    cycle0(config, pacakgesline)
  File "/home/tabulate/.local/lib/python3.8/site-packages/fetch_cord/run_rpc.py", line 187, in cycle0
    rpc_tryclear(RPC)
  File "/home/tabulate/.local/lib/python3.8/site-packages/fetch_cord/run_rpc.py", line 75, in rpc_tryclear
    RPC.clear(pid=os.getpid())
  File "/home/tabulate/.local/lib/python3.8/site-packages/pypresence/presence.py", line 37, in clear
    return self.loop.run_until_complete(self.read_output())
  File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
    return future.result()
  File "/home/tabulate/.local/lib/python3.8/site-packages/pypresence/baseclient.py", line 105, in read_output
    raise ServerError(payload["data"]["message"])
pypresence.exceptions.ServerError: Cannot read property 'application_id' of undefined

Operating system & way of installation

I'm using Manjaro and I've installed FetchCord with pip, pip3 install fetchcord

Error/issue

I installed FetchCord and NeoFetch, and ran it. It works for about 30 seconds and then gets this error:

Traceback (most recent call last):
  File "/home/tabulate/.local/bin/fetchcord", line 8, in <module>
    sys.exit(main())
  File "/home/tabulate/.local/lib/python3.8/site-packages/fetch_cord/run_rpc.py", line 39, in main
    loonix(config, loop, gpuinfo, memline, cpuinfo,
  File "/home/tabulate/.local/lib/python3.8/site-packages/fetch_cord/run_rpc.py", line 424, in loonix
    cycle0(config, pacakgesline)
  File "/home/tabulate/.local/lib/python3.8/site-packages/fetch_cord/run_rpc.py", line 187, in cycle0
    rpc_tryclear(RPC)
  File "/home/tabulate/.local/lib/python3.8/site-packages/fetch_cord/run_rpc.py", line 75, in rpc_tryclear
    RPC.clear(pid=os.getpid())
  File "/home/tabulate/.local/lib/python3.8/site-packages/pypresence/presence.py", line 37, in clear
    return self.loop.run_until_complete(self.read_output())
  File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
    return future.result()
  File "/home/tabulate/.local/lib/python3.8/site-packages/pypresence/baseclient.py", line 105, in read_output
    raise ServerError(payload["data"]["message"])
pypresence.exceptions.ServerError: Cannot read property 'application_id' of undefined

Tell me if you need any more information

BlivionIaG commented 3 years ago

Thank you, i'm already aware of the issue, I am currently working on a fix but I don't have the time for two or three day.

BlivionIaG commented 3 years ago

Hello, so i tried to track the error and i stopped getting it for some reason today (i don't know why), can you try this version ? pip install FetchCord-2.7.0-py3-none-any.whl (unzip the file i gave you first) FetchCord-2.7.0-py3-none-any.whl.zip Have a nice day.

TabulateJarl8 commented 3 years ago

I got this error, when i looked in your manifest of that branch, you had spelled resources as ressources

Traceback (most recent call last):
  File "/home/tabulate/.local/bin/fetchcord", line 5, in <module>
    from fetch_cord.__main__ import main
  File "/home/tabulate/.local/lib/python3.8/site-packages/fetch_cord/__main__.py", line 5, in <module>
    from .run_rpc import Run_rpc
  File "/home/tabulate/.local/lib/python3.8/site-packages/fetch_cord/run_rpc.py", line 8, in <module>
    from .config import ConfigError, load_config
  File "/home/tabulate/.local/lib/python3.8/site-packages/fetch_cord/config.py", line 10, in <module>
    from . import resources as fc_resources
ImportError: cannot import name 'resources' from 'fetch_cord' (/home/tabulate/.local/lib/python3.8/site-packages/fetch_cord/__init__.py)
TabulateJarl8 commented 3 years ago

I've fixed the error in #114 and now when I build it myself and install that, after about 30 seconds I get this error:

('DEFAULT', <Section: DEFAULT>)
('cycle_0', <Section: cycle_0>)
('cycle_1', <Section: cycle_1>)
('cycle_2', <Section: cycle_2>)
('cycle_3', <Section: cycle_3>)
Traceback (most recent call last):
  File "/home/tabulate/.local/bin/fetchcord", line 8, in <module>
    sys.exit(main())
  File "/home/tabulate/.local/lib/python3.8/site-packages/fetch_cord/__main__.py", line 100, in main
    run.run_loop(computer)
  File "/home/tabulate/.local/lib/python3.8/site-packages/fetch_cord/run_rpc.py", line 63, in run_loop
    func(self, self.loops_indexes[i], computer)
  File "/home/tabulate/.local/lib/python3.8/site-packages/fetch_cord/cycles.py", line 126, in cycle1
    bottom_line = computer.gpu
  File "/home/tabulate/.local/lib/python3.8/site-packages/fetch_cord/computer/Computer.py", line 124, in gpu
    temp.append(gpu.model.lstrip().rstrip())
  File "/home/tabulate/.local/lib/python3.8/site-packages/fetch_cord/computer/gpu/Gpu_interface.py", line 14, in model
    return self._model
AttributeError: 'Gpu_intel' object has no attribute '_model'
BlivionIaG commented 3 years ago

Wait how ? I renamed everything to "resources" on 2.7, that error is normal i forgot to add intel gpu stuff ^^, Edit : my bad i forgot about manifest

TabulateJarl8 commented 3 years ago

Would you like me to update my PR do use resources instead of ressources?

TabulateJarl8 commented 3 years ago

Or make a new one because I see that you've merged my existing one. I've already made the changes, I would just have to create one

BlivionIaG commented 3 years ago

Well in theory now things should be fixed (until something else breaks)

BlivionIaG commented 3 years ago

FetchCord-2.7.0-py3-none-any.whl.zip (Or from 2.7 branch)

TabulateJarl8 commented 3 years ago

It made it through all of the cycles successfully except there was an error on the battery stage, but it's unrelated to this issue and I know the cause. Should I start a new issue or keep going on this one?

TabulateJarl8 commented 3 years ago

Ill create a new one since its a different issue. Marking this as closed

BlivionIaG commented 3 years ago

Sorry, i got that issue now ^^ thats sad, i asked some help on pypresence server, since I can't understand the error, i successfully "reproduced" the error in some code snippet.

BlivionIaG commented 3 years ago

Ok, so i found a way to dodge the problem, though the code should have worked, so i'm closing it for now