![]() |
unicodedecodeerror:utf codec can't decode byte 0xe3 in position 1 - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: unicodedecodeerror:utf codec can't decode byte 0xe3 in position 1 (/thread-21790.html) |
unicodedecodeerror:utf codec can't decode byte 0xe3 in position 1 - mariolopes - Oct-14-2019 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 RE: unicodedecodeerror:utf codec can't decode byte 0xe3 in position 1 - buran - Oct-14-2019 what is lopes ? also post full traceback you get, in error tags
RE: unicodedecodeerror:utf codec can't decode byte 0xe3 in position 1 - mariolopes - Oct-14-2019 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 ![]() Maybe the problema is in playsound let me do some tests RE: unicodedecodeerror:utf codec can't decode byte 0xe3 in position 1 - mariolopes - Oct-14-2019 Sorry guys The problem is with the line playsound('sineta2.mp3')because I forgot to copy this file sineta.mp3 to the app folder |