mps-youtube / yewtube

yewtube, forked from mps-youtube , is a Terminal based YouTube player and downloader. No Youtube API key required.
GNU General Public License v3.0
8.08k stars 644 forks source link

Error when starting the script #1267

Open Jangsoodlor opened 7 months ago

Jangsoodlor commented 7 months ago

I get UnicodeDecodeError when I tried to run the script, after a fresh install:

                                                                                        | |       | |
                                                                     _   _  _____      _| |_ _   _| |__   ___
                                                                    | | | |/ _ \ \ /\ / / __| | | | '_ \ / _ \
                                                                    | |_| |  __/\ V  V /| |_| |_| | |_) |  __/
                                                                     \__, |\___| \_/\_/  \__|\__,_|_.__/ \___|
                                                                      __/ |
                                                                     |___/
                                                                        v2.9.2

Enter /search-term to search or [h]elp
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Users\Jangsoodlor\AppData\Local\Programs\Python\Python311\Scripts\yt.exe\__main__.py", line 7, in <module>
  File "C:\Users\Jangsoodlor\AppData\Local\Programs\Python\Python311\Lib\site-packages\mps_youtube\main.py", line 132, in main
    history.load()
  File "C:\Users\Jangsoodlor\AppData\Local\Programs\Python\Python311\Lib\site-packages\mps_youtube\history.py", line 24, in load
    g.userhist['history'] = read_m3u(g.HISTFILE)
                            ^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Jangsoodlor\AppData\Local\Programs\Python\Python311\Lib\site-packages\mps_youtube\playlists.py", line 66, in read_m3u
    if plf.readline().startswith('#EXTM3U'):
       ^^^^^^^^^^^^^^
  File "C:\Users\Jangsoodlor\AppData\Local\Programs\Python\Python311\Lib\encodings\cp874.py", line 23, in decode
    return codecs.charmap_decode(input,self.errors,decoding_table)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
UnicodeDecodeError: 'charmap' codec can't decode byte 0x90 in position 134: character maps to <undefined>

My Environment

yewtube version    : 2.9.2
yt_dlp version     : 2023.12.30
Python version     : 3.11.4 (tags/v3.11.4:d2340ef, Jun  7 2023, 05:45:37) [MSC v.1934 64 bit (AMD64)]
Processor          : AMD64 Family 23 Model 96 Stepping 1, AuthenticAMD
Machine type       : AMD64
Architecture       : 64bit, WindowsPE
Platform           : Windows-10-10.0.19045-SP0
sys.stdout.enc     : utf-8
default enc        : utf-8
Config dir         : C:\Users\Jangsoodlor\AppData\Roaming\mps-youtube
dbus               : None
glib               : False
env:LANG           : en_US.UTF-8
iamtalhaasghar commented 4 months ago

is this still happening?

Jangsoodlor commented 4 months ago

yes