fetchcord / FetchCord

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

FetchCord doesn't detect my distro, motherboard, CPU, GPU, terminal, and DE/WM #171

Closed gohoski closed 1 month ago

gohoski commented 2 years ago

...and there are a lot of errors. fetchcord --debug:

Traceback (most recent call last):
  File "D:\Program Files\Python\Python38\Scripts\neofetch-script.py", line 33, i
n <module>
    sys.exit(load_entry_point('neofetch-win==1.1.5.1', 'console_scripts', 'neofe
tch')())
  File "D:\Program Files\Python\Python38\lib\site-packages\neofetch_win\main.py"
, line 63, in main
    shell()
  File "D:\Program Files\Python\Python38\lib\site-packages\neofetch_win\main.py"
, line 55, in shell
    print(
  File "D:\Program Files\Python\Python38\lib\site-packages\colorama\ansitowin32.
py", line 41, in write
    self.__convertor.write(text)
  File "D:\Program Files\Python\Python38\lib\site-packages\colorama\ansitowin32.
py", line 162, in write
    self.write_and_convert(text)
  File "D:\Program Files\Python\Python38\lib\site-packages\colorama\ansitowin32.
py", line 187, in write_and_convert
    self.write_plain_text(text, cursor, start)
  File "D:\Program Files\Python\Python38\lib\site-packages\colorama\ansitowin32.
py", line 195, in write_plain_text
    self.wrapped.write(text[start:end])
  File "D:\Program Files\Python\Python38\lib\encodings\cp1251.py", line 19, in e
ncode
    return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode characters in position 12-13: c
haracter maps to <undefined>
Traceback (most recent call last):
  File "D:\Program Files\Python\Python38\Scripts\neofetch-script.py", line 33, i
n <module>
    sys.exit(load_entry_point('neofetch-win==1.1.5.1', 'console_scripts', 'neofe
tch')())
  File "D:\Program Files\Python\Python38\lib\site-packages\neofetch_win\main.py"
, line 63, in main
    shell()
  File "D:\Program Files\Python\Python38\lib\site-packages\neofetch_win\main.py"
, line 55, in shell
    print(
  File "D:\Program Files\Python\Python38\lib\site-packages\colorama\ansitowin32.
py", line 41, in write
    self.__convertor.write(text)
  File "D:\Program Files\Python\Python38\lib\site-packages\colorama\ansitowin32.
py", line 162, in write
    self.write_and_convert(text)
  File "D:\Program Files\Python\Python38\lib\site-packages\colorama\ansitowin32.
py", line 187, in write_and_convert
    self.write_plain_text(text, cursor, start)
  File "D:\Program Files\Python\Python38\lib\site-packages\colorama\ansitowin32.
py", line 195, in write_plain_text
    self.wrapped.write(text[start:end])
  File "D:\Program Files\Python\Python38\lib\encodings\cp1251.py", line 19, in e
ncode
    return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode characters in position 12-13: c
haracter maps to <undefined>
('DEFAULT', <Section: DEFAULT>)
('cycle_0', <Section: cycle_0>)
('cycle_1', <Section: cycle_1>)
('cycle_2', <Section: cycle_2>)
('cycle_3', <Section: cycle_3>)

neofetch --noart:

Глеб@Глеб-ПК
------------
OS: Windows 7 ??
Uptime: 1 hour, 2 minutes and 23 seconds
Local IP: 192.168.0.100
Motherboard: ASRock (G41M-GS3)
CPU: Intel(R) Xeon(R) CPU L5420@ 2.50GHz
GPU: AMD Radeon HD 5800 Series
Memory: 6.2GiB / 8.0GiB (77.43%)
Disk: C: 51.2GiB / 55.8GiB (91.68%)
      D: 638.0GiB / 931.5GiB (68.49%)

I am using Windows 7 Ultimate x64. Oh, and my language is Russian My Python version is 3.8.9

BlivionIaG commented 2 years ago

Oh it seams that there is some conflit with encoding, i need to look at it, thks.

gohoski commented 2 years ago

Did you fix it?

BlivionIaG commented 2 years ago

Ok so after some investigations this error comes from neofetch-win, i need to check if i can fix that and send a pr, i need to make myself a windows install to test it also :)

Edit: maybe not, that's an odd issue since you made it work with neofetch --noart Edit2: Ok it's related to colorama dependency Edit3: I'll follow this issue : https://github.com/tartley/colorama/issues/319