• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

A py file converted to windows based exe fails to execute script

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the following small py code works in Python and when converted to console exe. However, when I convert it into windows based exe it displays "Fail to Execute Script" message.
The converter I use is auto-py-to-exe.
Your helps are appreciated


weight= float(input("Enter Your weight in Kilograms: "))
height= float(input("Enter Your Height in Metres: "))
heightsqr= height**2
if weight/heightsqr <18:
   print ("Your BMI Is",weight/heightsqr,".", "You Are Underweight")
elif weight/heightsqr < 26:
   print("Your BMI Is", weight/heightsqr,".", "You are Normal")
elif weight/heightsqr <31:
   print("Your BMI Is", weight/heightsqr,".", "You are Overweight")
else:
   print("Your BMI Is", weight/heightsqr,".", "You are Obese")
print(input('Press any key to close the program.')
 
Sheriff
Posts: 7696
533
Mac OS X VI Editor BSD Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

it displays "Fail to Execute Script" message


And that is all it says? I'd like to think there is something else given, more concrete reason. Do you get any errors during executable build?
 
Melaku Likka
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Liutauras Vilda wrote:

it displays "Fail to Execute Script" message


And that is all it says? I'd like to think there is something else given, more concrete reason. Do you get any errors during executable build?


There is no error during the build. Here is the screenshot.
auto-py-to-exe.JPG
[Thumbnail for auto-py-to-exe.JPG]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    Bookmark Topic Watch Topic
  • New Topic