Python Forum

Full Version: unicodedecodeerror:utf codec can't decode byte 0xe3 in position 1
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi
The following program runs ok in idle mode python
from tkinter import * 
from playsound import playsound
from pytube import YouTube
root=Tk()
root.title("Download vídeos do Youtube")
def descarrega():
    a=lopes.get();
    pimba=lopes.get()    
    yt = YouTube(pimba).streams.first().download()
    playsound('sineta2.mp3')
after run pyinstaller I got one exe file and I run it I got the error disctibed in the title of the post.
I try several things like

def descarrega():
    a=lopes.get();
    pimba=lopes.get()
    pimba.encode(encoding='UTF-8',errors='ignore')
    yt = YouTube(pimba).streams.first().download()
    playsound('sineta2.mp3')
But no luck. What is the solution for this error. The value of pimba is one youtube address maybe this is the problem with the enconding.
Thank you
what is lopes? also post full traceback you get, in error tags
Hi
lopes is the the result of one entry widget
lopes=Entry(root,fg="red",width=50)
lopes.grid(row=1,column=1)
lopes.focus_set()
I use Tkinter
Here is the error that I got

[Image: erro.jpg]

Maybe the problema is in playsound let me do some tests
Sorry guys
The problem is with the line
playsound('sineta2.mp3')
because I forgot to copy this file sineta.mp3 to the app folder