pikaraoke icon indicating copy to clipboard operation
pikaraoke copied to clipboard

Error downloading song (Latin-1)

Open davidscherf opened this issue 1 year ago • 4 comments

Describe the bug Search a song you do not have AEce22afpbU

The song never downloads Console output says latin-1 codec can't encode character '\uff5c' in position 69: ordinal not in range(256)

To Reproduce

  1. Search on phone for song
  2. Select download an queue
  3. See error on console

Expected behavior Download the video and queue it

Screenshots image

Platform

  • OS: Raspberry PI 400
  • OS version: Raspberry PI OS 5.1
  • Browser: chrome
  • Youtube Downloader: 2023.12.30

Additional context Seems to be a bug report from 2022 about this issue here https://github.com/yt-dlp/yt-dlp/issues/5341

davidscherf avatar Jan 30 '24 19:01 davidscherf

I don't know how my setup makes a difference but I've just tried that same youtube URL (including the AEce22afpbU part) and it downloaded and played on my Pi 5 using my Android phone as the browser for the app. The track is a Karafun edition of Under The Bridge. I know I'm a minor version or two behind the PiKaraoke curve (mine still needs the '-prefer-ip' switch) and there are probably a few updates available on the main OS.

Regards David

Hartebee5t avatar Jan 30 '24 22:01 Hartebee5t

Yes that is strange because this song does not include any special characters, usually that's the case with these sorts of issues. Are you sure it was this song and not some other non-english song?

On Tue, Jan 30, 2024 at 2:55 PM Hartebee5t @.***> wrote:

I don't how mine makes a difference but I've just tried that same youtube URL (including the AEce22afpbU part) and it downloded and played on my Pi 5 using my Android phone as the browser for the app. The track is a Karafun edition of Under The Bridge. I know I'm a minor version or two behind the PiKaraoke curve (mine still needs the '-prefer-ip' switch) and there are probably a few updates available on the main OS.

Regards David

— Reply to this email directly, view it on GitHub https://github.com/vicwomg/pikaraoke/issues/314#issuecomment-1918050869, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA7KXNQWZ724MKZSFWMBT2LYRF24NAVCNFSM6AAAAABCR2SUXOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMJYGA2TAOBWHE . You are receiving this because you are subscribed to this thread.Message ID: @.***>

vicwomg avatar Feb 01 '24 17:02 vicwomg

Hello, i've the same issue with vietnamese or french songs (like karafun) If the name of the song have | (pipe) or * (asterisk) image

my log :

ERROR: 'latin-1' codec can't encode character '\uff0a' in position 71: ordinal not in range(256) [2024-08-03 12:12:28] ERROR: Error code while downloading, retrying once... ERROR: 'latin-1' codec can't encode character '\uff0a' in position 71: ordinal not in range(256) [2024-08-03 12:12:37] ERROR: Error downloading song: https://www.youtube.com/watch?v=ZocabPIVreU [2024-08-03 12:13:08] INFO: Downloading video: https://www.youtube.com/watch?v=AEz6BfE4__U ERROR: 'latin-1' codec can't encode character '\uff0a' in position 66: ordinal not in range(256) [2024-08-03 12:13:17] ERROR: Error code while downloading, retrying once... ERROR: 'latin-1' codec can't encode character '\uff0a' in position 66: ordinal not in range(256) [2024-08-03 12:13:24] ERROR: Error downloading song: https://www.youtube.com/watch?v=AEz6BfE4__U [2024-08-03 12:15:21] INFO: Song ending: karaok▒ daniel balavoine le chanteur [2024-08-03 12:16:31] INFO: Downloading video: https://www.youtube.com/watch?v=AEz6BfE4__U ERROR: 'latin-1' codec can't encode character '\uff0a' in position 66: ordinal not in range(256) [2024-08-03 12:16:39] ERROR: Error code while downloading, retrying once... ERROR: 'latin-1' codec can't encode character '\uff0a' in position 66: ordinal not in range(256) [2024-08-03 12:16:48] ERROR: Error downloading song: https://www.youtube.com/watch?v=AEz6BfE4__U [2024-08-03 12:16:57] INFO: Searching YouTube for: karafun karaoke [2024-08-03 12:17:03] INFO: Downloading video: https://www.youtube.com/watch?v=T3YBQqc9xLg ERROR: 'latin-1' codec can't encode character '\uff5c' in position 65: ordinal not in range(256) [2024-08-03 12:17:11] ERROR: Error code while downloading, retrying once... [2024-08-03 12:17:15] INFO: Searching YouTube for: karafun karaoke ERROR: 'latin-1' codec can't encode character '\uff5c' in position 65: ordinal not in range(256) [2024-08-03 12:17:18] ERROR: Error downloading song: https://www.youtube.com/watch?v=T3YBQqc9xLg [2024-08-03 12:18:35] INFO: Song ending: None

In raspi-config i tried to add/change local zone (with reboot) but i've got the same issue. image image

Tested from mobile phone android, ipad mini4 and Pc win11+chrome i think the problem is from the server not the client.

Do you have an idea ?

my configuration 👍 raspberry Pi4 image

Franck77590 avatar Aug 03 '24 10:08 Franck77590

i found a solution.

when using "raspi PI imager" to flash RaspiOS on SD/USB , don't use "local settings" image

before i change settings to

  • _Europe/Paris
  • fr_

i don't changed this setting and download/playing are working with special characters

exemple : vietnamese characters image or (asterisk) image or (pipe) image

it will be a good idea to explain that in README.md :p

Franck77590 avatar Aug 03 '24 14:08 Franck77590