Giter VIP home page Giter VIP logo

Comments (3)

SaqinNoor avatar SaqinNoor commented on June 12, 2024

Windows 11 (64-bit)
Python 3.12.1
Git Bash

Tried two songs, both of them return similar errors

User@User MINGW64 ~
$ ytmdl https://music.youtube.com/watch?v=uw9ABw6-gis&si=CV8OFdMd7qtSkHx4
[1] 131

User@User MINGW64 ~
$  ==> Searching to see if already present in C:\Users\User\Music
 ==> Searching Youtube for https://music.youtube.com/watch?v=uw9ABw6-gis
 ==> Choose One (One with [M] is verified music)
 [1] Channel 1 by The Chainsmokers with dur 3:20
 [2] ▒The Chainsmokers - Channel 1 (Nightcore)▒ by 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\User\AppData\Local\Programs\Python\Python312\Scripts\ytmdl.exe\__main__.py", line 7, in <module>
  File "C:\Users\User\AppData\Local\Programs\Python\Python312\Lib\site-packages\ytmdl\main.py", line 614, in entry
    extract_data()
  File "C:\Users\User\AppData\Local\Programs\Python\Python312\Lib\site-packages\ytmdl\main.py", line 609, in extract_data
    main(args)
  File "C:\Users\User\AppData\Local\Programs\Python\Python312\Lib\site-packages\ytmdl\main.py", line 275, in main
    link, yt_title = search(song_name=song_name, args=args)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\User\AppData\Local\Programs\Python\Python312\Lib\site-packages\ytmdl\core.py", line 63, in search
    choice = song.getChoice(data, 'mp3')
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\User\AppData\Local\Programs\Python\Python312\Lib\site-packages\ytmdl\song.py", line 166, in getChoice
    print_choice(beg, results, SONG_INFO, type)
  File "C:\Users\User\AppData\Local\Programs\Python\Python312\Lib\site-packages\ytmdl\song.py", line 105, in print_choice
    print(SONG_INFO[beg]['author_name'], end='')
  File "C:\Users\User\AppData\Local\Programs\Python\Python312\Lib\site-packages\colorama\ansitowin32.py", line 47, in write
    self.__convertor.write(text)
  File "C:\Users\User\AppData\Local\Programs\Python\Python312\Lib\site-packages\colorama\ansitowin32.py", line 177, in write
    self.write_and_convert(text)
  File "C:\Users\User\AppData\Local\Programs\Python\Python312\Lib\site-packages\colorama\ansitowin32.py", line 205, in write_and_convert
    self.write_plain_text(text, cursor, len(text))
  File "C:\Users\User\AppData\Local\Programs\Python\Python312\Lib\site-packages\colorama\ansitowin32.py", line 210, in write_plain_text
    self.wrapped.write(text[start:end])
  File "C:\Users\User\AppData\Local\Programs\Python\Python312\Lib\site-packages\colorama\ansitowin32.py", line 47, in write
    self.__convertor.write(text)
  File "C:\Users\User\AppData\Local\Programs\Python\Python312\Lib\site-packages\colorama\ansitowin32.py", line 177, in write
    self.write_and_convert(text)
  File "C:\Users\User\AppData\Local\Programs\Python\Python312\Lib\site-packages\colorama\ansitowin32.py", line 205, in write_and_convert
    self.write_plain_text(text, cursor, len(text))
  File "C:\Users\User\AppData\Local\Programs\Python\Python312\Lib\site-packages\colorama\ansitowin32.py", line 210, in write_plain_text
    self.wrapped.write(text[start:end])
  File "C:\Users\User\AppData\Local\Programs\Python\Python312\Lib\site-packages\colorama\ansitowin32.py", line 47, in write
    self.__convertor.write(text)
  File "C:\Users\User\AppData\Local\Programs\Python\Python312\Lib\site-packages\colorama\ansitowin32.py", line 177, in write
    self.write_and_convert(text)
  File "C:\Users\User\AppData\Local\Programs\Python\Python312\Lib\site-packages\colorama\ansitowin32.py", line 205, in write_and_convert
    self.write_plain_text(text, cursor, len(text))
  File "C:\Users\User\AppData\Local\Programs\Python\Python312\Lib\site-packages\colorama\ansitowin32.py", line 210, in write_plain_text
    self.wrapped.write(text[start:end])
  File "C:\Users\User\AppData\Local\Programs\Python\Python312\Lib\encodings\cp1252.py", line 19, in encode
    return codecs.charmap_encode(input,self.errors,encoding_table)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
UnicodeEncodeError: 'charmap' codec can't encode characters in position 0-5: character maps to <undefined>

from ytmdl.

SaqinNoor avatar SaqinNoor commented on June 12, 2024

Hello? It's been 2 weeks and you've commented on all recent issues except this one. What's wrong man.

from ytmdl.

deepjyoti30 avatar deepjyoti30 commented on June 12, 2024

Hey @SaqinNoor I am not sure why I might have skipped this one earlier but looking back at the issue, I am afraid I might have skipped it because it's an Windows specifc issue. ytmdl has had issues running on windows from the past and I don't have access to a Win machine to reproduce/debug/fix this on my end thus I find it quite hard to debug these issues.

Also, the issue seems specific to the usage of the colorama package which supposedly has good support for Win (one of the reasons I went with it) so I am not sure where to start debugging this.

As an alternative, you could try WSL as multiple users have reported in the past that it works fine for them on there.

from ytmdl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.