Python Forum
error when running code
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
error when running code
#7
>>> float('')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: could not convert string to float: 
you can either use try/except or if you havn't learned that - check the user input before trying to convert to float
Reply


Messages In This Thread
error when running code - by kiki1113 - Sep-25-2017, 02:03 AM
RE: error when running code - by metulburr - Sep-25-2017, 02:16 AM
RE: error when running code - by ichabod801 - Sep-25-2017, 02:17 AM
RE: error when running code - by kiki1113 - Sep-25-2017, 04:01 PM
RE: error when running code - by kiki1113 - Sep-26-2017, 07:51 PM
RE: error when running code - by nilamo - Sep-26-2017, 07:58 PM
RE: error when running code - by buran - Sep-26-2017, 08:14 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Running my game file yields a different error on a different computer system Bruizeh 0 1,510 Nov-10-2020, 03:15 AM
Last Post: Bruizeh

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020