Unhelpful error message

Thomas Nyberg tomuxiong at gmx.com
Tue Jun 6 17:45:51 EDT 2017


On 06/06/2017 02:32 PM, Chris Angelico wrote:
> 
> That's what I thought. If the OP's happy to upgrade to 3.6/3.7, of
> course, the problem disappears.
> 
> ChrisA
> 
As far as I can tell this affects all versions of python. Here are some
versions I played with:

2.7:

>>> float("")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: could not convert string to float:

3.4:

>>> float("")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: could not convert string to float:

3.6:

>>> float("")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: could not convert string to float:


3.7.0a0:

>>> float("")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: could not convert string to float:

Cheers,
Thomas



More information about the Python-list mailing list