Uncaught Python exception - ValueError: could not convert string to float: 'True'
Fuzzer issue 50322
| === Uncaught Python exception: === | |
|---|---|
| ValueError: could not convert string to float: 'True' | |
| Traceback (most recent call last): | |
| File "fuzz_tabulate.py", line 37, in TestOneInput | |
| File "tabulate/init.py", line 2171, in tabulate | |
| File "tabulate/init.py", line 2172, in <listcomp> | |
| File "tabulate/init.py", line 2172, in <listcomp> | |
| File "tabulate/init.py", line 1239, in _format |
Probably related: #189
Hi @astanin, is it possible to fix this issue? We are running into this issue in a third party software in production and would love to see https://github.com/astanin/python-tabulate/pull/236 being reviewed and merged.
I think it is related to an issue I just stumbled upon:
tabulate.tabulate([['False'], ['1.']]) will raise a ValueError, my understanding is that it tries to convert the whole column to float, then fails with False. The behaviour I would expect is to not convert anything, I pass strings for a reason, if I want numbers I will pass numbers.