Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught Python exception - ValueError: could not convert string to float: 'True' #209

Open
astanin opened this issue Oct 19, 2022 · 3 comments
Labels
bug Something isn't working
Milestone

Comments

@astanin
Copy link
Owner

astanin commented Oct 19, 2022

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
@astanin astanin added the bug Something isn't working label Oct 19, 2022
@astanin
Copy link
Owner Author

astanin commented Oct 19, 2022

Probably related: #189

@jimmyzzxhlh
Copy link

jimmyzzxhlh commented Oct 10, 2023

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 #236 being reviewed and merged.

@fabiensatalia
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants