Problems when generating executable

Asked

Viewed 42 times

0

I’ve never seen myself in need of generating a file. EXE, because my programs were tested on my own machine, but now however I need to generate an EXE to test on other computers.

In my program I imported the following libraries:

from pygame  import mixer # Load the required library
from pygame  import time #teste
from tkinter.filedialog import askopenfilename
from tkinter import *

import tkinter.simpledialog
import tkinter.messagebox 

When I run the script in the interpreter, the program runs normally, but when I run the EXE and click on the "Create playlist" or "Open Playlist" buttons, it returns an error, saying that the simpledialog name was not set in the program.

I’ve tried to add:

name  = tkinter.simpledialog.askstring("Name", "Nome da Playlist")  
name  = simpledialog.askstring("Name", "Nome da Playlist")

But it still doesn’t work, I’m sending a print. inserir a descrição da imagem aqui

  • Are you using what to pack the exe? I have not seen your import and I have no knowledge in GUI with Python, but I think it may be that when packaging your application some module has been left out. I’ve had similar problem with an application of mine packaged with py2exe.

  • 1

    @Henriquemarti - The problem was in Name going, I declared it in the interpreter as name, and inside the entry I used Name. the interpreter passed, but the EXE did not open

  • Well, so you already solved, right? I think it would be a good thing if you put an answer to yourself explaining the problem and the solution. This will help more people. Hug

  • 1

    @Henriquemarti - Right then, I’ll add an answer

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.