0

Create a program with GUI, by converting it to .EXE with auto-py-to-exe windows and virus total detect it as a virus. My intention is to distribute the program so the users can download and use it. The program is in charge of calculating the weight of the user on the planet that he indicates. I reduced the conditions actually used in the program a bit, since stack over flow would not let me publish it in its entirety because "it was mostly code". Here is the complete code https://github.com/fpedaccio/How-much-would-I-weight-in-/blob/main/main.py


from tkinter import *



# User Interface (GUI)
ventana = Tk()
peso = IntVar()
planeta = StringVar()
res = StringVar()
ventana.geometry("1000x700")
ventana.title("How much would I weight in? APP")
ventana.iconbitmap("C:\guiplanetas\planet.ico")
gui = PhotoImage(file="C:\guiplanetas\gui.png")
guiplace = Label(ventana, image=gui)
guiplace.place(x=0, y=0, relwidth=1, relheight=1)


# Calculate weight function: based on W = m*g
# W = Weight, m = Mass, g = gravitational acceleration

def calcular():
    planetinput=str(planeta.get())
    mars = (peso.get()*3.7)//9.8
    moon = (peso.get()*(1.62))//9.8
   

    
    if "Marte" in planetinput:
        res.set(str(mars )+ " KG")
    elif "marte" in planetinput:
        res.set(str(mars)+ " KG")
    elif "mars" in planetinput:
        res.set(str(mars)+ " KG")
    elif "Mars" in planetinput:
        res.set(str(mars)+ " KG")
    elif "MARS" in planetinput:
        res.set(str(mars)+ " KG")    
    elif "MARTE" in planetinput:
        res.set(str(mars)+ " KG")
    elif "Moon" in planetinput:
        res.set(str( moon)+ " KG")
   
   
    
    else:
        res.set("Planet not found")
    
    
    
    
# Saving user inputs into variables. Peso = Weight, planeta = planet
peso = IntVar()
planeta = StringVar()

# Result variable
res = StringVar()



# Used fonts
fontentry= ("Montserrat", 15, "bold")
fontbuttom= ("Montserrat", 10, "bold")
fontresult = ("Montserrat", 20, "bold")


# Entry boxes
pesoentry = Entry(ventana, justify="center", font=(fontentry), bd=0,textvariable=peso)
pesoentry.place(x=285,y=253, width=370, height=37)

planeta = Entry(ventana,justify="center", font=(fontentry), bd=0,textvariable=planeta)
planeta.place(x=256,y=352,width=450, height=38)

# Result Label
textoR = Label(ventana,textvariable=res,font=(fontresult), bd=0, bg="alice blue", fg="black")
textoR.place(x=650,y=515)

# Calculate button
boton = Button(ventana,text="Calculate",command=calcular,bg="white",fg="black", bd=0, font=(fontbuttom))
boton.place(x=433,y=453)
ventana.mainloop()
  • 1
    Some antivirus engines incorrectly mark python frozen application as a virus, which is “False Positive”, you can fill a false positive report and send your exe file on antivirus’ website and they will correct their database – Mahmoud Elshahat Apr 05 '21 at 18:49
  • 1
    Reading this might help answer your question [Pyinstaller .exe throws Windows Defender](https://stackoverflow.com/questions/44377666/pyinstaller-exe-throws-windows-defender-no-publisher)? – Nicholas Hunter Apr 05 '21 at 18:50
  • To be honest, I think, there is nothing you can do other than buy a digital signature for your app. – Delrius Euphoria Apr 05 '21 at 19:23
  • This is a false positive and Microsoft will not take any false positive report from an individual developer seriously, even if you can manage to negotiate their web page to report it. In one case I made the problem go away by packaging up a Python 3.8 `.exe` instead of Python 3.9 one. But that is not guaranteed to work always, even for a slightly different version of the same program. – BoarGules Apr 05 '21 at 20:25

0 Answers0