• 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
  • Paul Clapham
  • Liutauras Vilda
  • Knute Snortum
  • Bear Bibeault
Sheriffs:
  • Devaka Cooray
  • Jeanne Boyarsky
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • salvin francis
Bartenders:
  • Tim Holloway
  • Piet Souris
  • Frits Walraven

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.')
 
Marshal
Posts: 7493
509
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]
 
We've gotta get close enough to that helmet to pull the choke on it's engine and flood his mind! Or, we could just read this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!