Issue #29 resolved

Exception being thrown

Anonymous created an issue

Thank you for your work on this module. During my testing I came across an exception being thrown. Modifying line 215 has fixed the issue for me.

except (TypeError, ValueError):
Traceback (most recent call last):
  File "/Users/swoodall6/", line 11, in <module>
    print(tabulate(records, headers=columns, tablefmt='orgtbl'))
  File "/Volumes/data/Source/personal/python-pgextras/venv/lib/python2.7/site-packages/", line 753, in tabulate
    coltypes = list(map(_column_type, cols))
  File "/Volumes/data/Source/personal/python-pgextras/venv/lib/python2.7/site-packages/", line 426, in _column_type
    types = [_type(s, has_invisible) for s in strings ]
  File "/Volumes/data/Source/personal/python-pgextras/venv/lib/python2.7/site-packages/", line 269, in _type
    elif _isnumber(string):
  File "/Volumes/data/Source/personal/python-pgextras/venv/lib/python2.7/site-packages/", line 228, in _isnumber
    return _isconvertible(float, string)
  File "/Volumes/data/Source/personal/python-pgextras/venv/lib/python2.7/site-packages/", line 213, in _isconvertible
    n = conv(string)
TypeError: float() argument must be a string or a number