The maxcolwidths parameter does not work with an integer field. And with a bool field, the program breaks down with the error: AttributeError: 'bool' object has no attribute 'expandtabs'
print(tabulate([["string", "integer"]] + [["some test string", "255454546"]], tablefmt="rounded_grid", maxcolwidths = [10, 2]))
/py_test/venv/lib/python3.8/site-packages/tabulate/__init__.py", line 1518, in _wrap_text_to_colwidths wrapped = wrapper.wrap(casted_cell) File "/usr/lib/python3.8/textwrap.py", line 351, in wrap chunks = self._split_chunks(text) File "/usr/lib/python3.8/textwrap.py", line 337, in _split_chunks text = self._munge_whitespace(text) File "/usr/lib/python3.8/textwrap.py", line 154, in _munge_whitespace text = text.expandtabs(self.tabsize) AttributeError: 'bool' object has no attribute 'expandtabs'
The maxcolwidths parameter does not work with an integer field. And with a bool field, the program breaks down with the error: AttributeError: 'bool' object has no attribute 'expandtabs'
print(tabulate([["string", "integer"]] + [["some test string", "255454546"]], tablefmt="rounded_grid", maxcolwidths = [10, 2]))
print(tabulate([["string", "bool"]] + [["some test string", "False"]], tablefmt="rounded_grid", maxcolwidths = [10, 2]))
/py_test/venv/lib/python3.8/site-packages/tabulate/__init__.py", line 1518, in _wrap_text_to_colwidths wrapped = wrapper.wrap(casted_cell) File "/usr/lib/python3.8/textwrap.py", line 351, in wrap chunks = self._split_chunks(text) File "/usr/lib/python3.8/textwrap.py", line 337, in _split_chunks text = self._munge_whitespace(text) File "/usr/lib/python3.8/textwrap.py", line 154, in _munge_whitespace text = text.expandtabs(self.tabsize) AttributeError: 'bool' object has no attribute 'expandtabs'